使用 netcat 查看 http 请求信息
所属分类 linux
浏览量 620
Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.
nc -l 8060
监听 8060端口
curl 发送请求到8060端口
在nc 控制台 查看 http 请求信息
curl http://127.0.0.1:8060
GET / HTTP/1.1
Host: 127.0.0.1:8060
User-Agent: curl/7.64.1
Accept: */*
curl -XPOST http://127.0.0.1:8888 -d 'hello'
POST / HTTP/1.1
Host: 127.0.0.1:8060
User-Agent: curl/7.64.1
Accept: */*
Content-Length: 5
Content-Type: application/x-www-form-urlencoded
hello
curl -XGET -H 'head1:value1' -H 'head2:value2' http://127.0.0.1:8060
GET / HTTP/1.1
Host: 127.0.0.1:8060
User-Agent: curl/7.64.1
Accept: */*
head1:value1
head2:value2
curl实用技巧
上一篇
下一篇
Vue简介
Javascript strip 去除首尾指定的字符串
jQuery 实用代码
jquery ajax 实例
XMLHttpRequest 例子
ssh端口转发