经常有需要在服务器抓 HTTP 包看接口情况,配合 tcpdump 和 wireshark 分析,感觉很麻烦,于是写了一个抓包工具
Github: https://github.com/six-ddc/httpflow
效果如下,欢迎大家提意见:

经常有需要在服务器抓 HTTP 包看接口情况,配合 tcpdump 和 wireshark 分析,感觉很麻烦,于是写了一个抓包工具
Github: https://github.com/six-ddc/httpflow
效果如下,欢迎大家提意见:

|
lxrmidoFeb 26, 2017
1
已 star ……
|
|
TangMonkFeb 26, 2017
2
不错!
|
|
MinonHeartFeb 26, 2017 via iPhone
3
和 curl 有什么区别么
看起来就是 curl |
|
MuninnFeb 26, 2017 via Android
4
@MinonHeart 十万八千里
|
|
KCheshireCatFeb 26, 2017
5
按实际功能来说不是应该跟 Fiddler 类似的工具比较么,虽然 Fiddler 是 win 平台的。
|
|
kindjeffFeb 26, 2017
6
@KCheshireCat fiddler 有个基于 mono 的 linux 版本,就是偶尔会卡。
|
|
ctsedFeb 26, 2017 via Android
7
有保存功能吗 在 fiddler chrome 等工具查看更方便一些
|
|
webjin1Feb 26, 2017
8
协议分析呢?
|
|
9
@ctsed 可以保存呢, http_dump -w ./out ,按 Host 分文件夹保存
|
|
slixurdFeb 26, 2017
10
大概楼主想要的是这个效果?
➜ ~ curl -D - v2ex.com HTTP/1.1 301 Moved Permanently Server: nginx/1.11.6 Date: Sun, 26 Feb 2017 06:02:14 GMT Content-Type: text/html Content-Length: 185 Connection: keep-alive Location: https://v2ex.com/ X-ORCA-Accelerator: from 093.chn.fuo01.cn.krill.c3edge.net <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx/1.11.6</center> </body> </html> ➜ ~ curl -iv --raw https://v2ex.com * Rebuilt URL to: https://v2ex.com/ * Trying 14.152.44.135... * TCP_NODELAY set * Connected to v2ex.com (14.152.44.135) port 443 (#0) * TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * Server certificate: *.v2ex.com * Server certificate: TrustAsia DV SSL CA - G5 * Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5 > GET / HTTP/1.1 > Host: v2ex.com > User-Agent: curl/7.51.0 > Accept: */* > < HTTP/1.1 301 Moved Permanently HTTP/1.1 301 Moved Permanently < Server: nginx/1.11.6 Server: nginx/1.11.6 < Date: Sun, 26 Feb 2017 06:02:40 GMT Date: Sun, 26 Feb 2017 06:02:40 GMT < Content-Type: text/html Content-Type: text/html < Content-Length: 185 Content-Length: 185 < Connection: keep-alive Connection: keep-alive < Location: https://www.v2ex.com/ Location: https://www.v2ex.com/ < Strict-Transport-Security: max-age=10886400; includeSubDomains; preload Strict-Transport-Security: max-age=10886400; includeSubDomains; preload < X-ORCA-Accelerator: from 093.chn.fuo01.cn.krill.c3edge.net X-ORCA-Accelerator: from 093.chn.fuo01.cn.krill.c3edge.net < <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx/1.11.6</center> </body> </html> * Curl_http_done: called premature == 0 * Connection #0 to host v2ex.com left intact |
|
unsecFeb 26, 2017
11
|
|
tony1016Feb 26, 2017
12
可以看看 bettercap
|
|
13
tcpdump 和 wireshark 配合很方便呀
ssh root@HOST tcpdump -U -s0 -w - 'not port 22' | "D:\Program Files\Wireshark\Wireshark.exe" -k -i - http://www.commandlinefu.com/commands/view/4373/analyze-traffic-remotely-over-ssh-w-wireshark |
|
LaxFeb 26, 2017 via iPad
14
compress 和 https 支持怎么样?
|
|
15
@Lax 支持 gzip ,不支持 https ,这种不用代理的抓包对 https 似乎无解
|
|
TangMonkFeb 27, 2017
16
二进制文件怎么处理好。。
|
|
17
|
|
TangMonkFeb 27, 2017
18
|
|
anyforeverFeb 27, 2017
19
想问下楼主怎么实现在右屏输入,在左屏响应的?
|
|
anyforeverFeb 27, 2017
20
另外,这个是不是你想要的? https://github.com/jkbrzt/httpie
|
|
huangmingyouFeb 27, 2017
21
少年,你用过 tcpick 吗
|
|
22
@huangmingyou 原来有这个工具,不错可以借鉴一下,另外他这个好像不支持 gzip 解压
|
|
23
@TangMonk 二进制显示问题已经加上了,暂时直接做忽略处理
|
|
antowaMar 1, 2017
24
感觉可以借鉴下。不过我一直用 chrome inspect (逃)
|