- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
在 linux 中使用 netcat 时,我可以从命令行执行 get fine。
nc google.com 80
GET / HTTP/1.1
Host:google.com
有人可以告诉我如何发帖吗?我试过没有运气。我还尝试使用\r\n 或换行的不同组合。我可以让它在 perl 和 c 中工作。
nc google.com 80
POST /test.php HTTP/1.1
Host:whatever.com
Content-Type:text/html
Content-Length:10
text=hello
header 显示它成功但没有返回任何内容?请帮忙
最佳答案
我能够通过使用 wireshark 进行故障排除来使其正常工作。
我需要添加一个内容类型
这行得通
POST/test.php HTTP/1.1
主机:127.0.0.1
内容类型:应用程序/x-www-form-urlencoded
内容长度:9
txt=99999
-----
PHP
关于linux - Netcat HTTP 发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4929041/
我有一个正在运行的树莓派,它在启动时开始监听端口 666。 'nc -k -l -p 666' 此服务器用于夺旗类型的游戏,我希望发生的情况如下。如果用户向服务器的 666 端口回显一条 secret
我有一些二进制命令(我用十六进制表示),需要将它们发送到远程设备(它是嵌入式数据收集设备)并观察答复。 使用netcat轻松连接 nc -v 192.168.200.34 19000 它坐在那里像蛤一
我想通过 netcat 发送以下内容: 99||0x00 (4 个 ASCII 字符和一个零) 这是怎么做的?我正在使用 Windows XP。 谢谢你。 最佳答案 # echo -ne "99||\
我正在尝试从 C: 执行以下命令 netcat 127.0.0.1 4444 这是我的代码: #include int main() { execlp("/usr/bin/netcat",
我使用简单的代码来测试一些服务: nc -v -w 2 google.com 80 Connection to google.com 80 port [tcp/http] succeeded! 它工作
是否可以仅在已使用的端口上监听(而不是创建新连接)TCP 数据包,即将数据从路由器发送到服务器。 我知道以下内容在提到的端口上启动监听进程,并将其保存在 pcap 中文件: 服务器端:nc -l -p
我正在尝试使用 netcat 每隔几毫秒读取文件中的一行,并将其发送到端口.. 到目前为止,我从 netcat 文档中知道它可以在发送的每行之间插入时间间隔: 这来自 netcat 帮助手册: -i
我有一个客户端连接到 localhost:10000 上的服务器。服务器不在同一主机中。但是我们无法从 IP 网络访问服务器。为此,我们正在编写自己的网络驱动程序来创建虚拟网络接口(interface
我有一个客户端连接到 localhost:10000 上的服务器。服务器不在同一主机中。但是我们无法从 IP 网络访问服务器。为此,我们正在编写自己的网络驱动程序来创建虚拟网络接口(interface
如果尝试连接的时间超过 3 秒(即:当端口未打开时),为什么以下 netcat 命令不会超时?我假设 -w 标志是我需要的。操作系统是 OSX 10.9。 nc -v -z -w 3 127.0.0.
是否可以通过 JavaScript、jQuery 或类似的东西在客户端使用 Netcat?基本上我想在客户端做类似以下的事情: nc 或 nc 123.456.789.10 9100 < myf
我有以下问题。我正在使用 Debian GNU/Linux Stretch,我正在尝试使用 netcat 作为一个简单的服务器。我使用以下命令启动它: $ netcat -l 127.0.0.1 33
我有一个 bash 脚本: #!/bin/bash while : do nc -l -p 30003 | python3 script.py done 我希望聆听始终
我有 2 个标题为 SERVER 和 CLIENT 的终端 我已经使用以下命令在 SERVER 上设置了一个 netcat 监听器 nc -lvp 12345 然后从 CLIENT 我连接到它使用 n
解决方案 while read -r line do echo $line done < <(nc -l -p 4001) 使用命令 nc -l -p 4001 -v 我可以监听条码扫
我正在使用 netcat 作为某些服务和 spark 流实例之间的桥梁。例如,服务将消息发送到 net cat 正在监听的 host:port,然后 spark 可以使用它。然而,有没有一种方法可以使
我在 Bash/Debian Linux 环境中建立了一系列到远程服务器的 netcat 连接,这些服务器定期向我发送消息。我不断地将这些消息的结果写入本地文件: nc 192.168.1.38 23
使用 netcat,我需要创建一个简单的服务器来响应简单的 JSON 数据。 首先我尝试使用 HTML 页面: while true ; do nc -l 8888 < index.html ; d
为什么当我从两个不同的终端执行以下命令时(在我的 Debian 8.4 机器上)没有输出“地址已在使用”类型的错误? netcat -p 1234 -l 我想知道为什么它不抛出错误,因为它启动了两个监
我有一个带有简单交互式命令行界面的嵌入式 Linux 应用程序。 我想从 telnet(或一般的网络)访问命令行。 但是,该过程应该在电路板打开时启动,并且是在一个独特的实例中。因此,以下 netca
我是一名优秀的程序员,十分优秀!