在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标头显示成功,但没有返回任何内容?请帮帮忙
发布于 2011-04-15 09:44:01
通过对wireshark进行故障排除,我能够使其正常工作。
我需要添加Content-Type
这是可行的
POST /test.php HTTP/1.1
主机:127.0.0.1
Content-Type:application/x-www-form-urlencoded
Content-Length:9
txt=99999
PHP
发布于 2011-02-08 10:40:39
您是否出于特定原因需要使用netcat?Curl可以原生发送帖子:http://linux.byexamples.com/archives/311/sending-http-post-using-curl-command/
https://stackoverflow.com/questions/4929041
复制相似问题