抓包工具tcpdump ngrep

tcpdump -lnA dst port 11700 -c 10 http抓包

tcpdump -lnX dst port 11700 -c 10

查看get
sudo tcpdump -s 0 -A 'tcp dst port 11700 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'

查看post
sudo tcpdump -s 0 -A 'tcp dst port 11700 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)'

查看HTTP請求響應頭以及數(shù)據(jù)
sudo tcpdump -A -s 0 'tcp port 11700 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
sudo tcpdump -X -s 0 'tcp port 11700 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'

sudo tcpdump -lnX dst host 10.0.1.57

肉眼可讀的 tcpdump -A -s 10240 'tcp port 11700 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | egrep --line-buffered "^........(GET |HTTP/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^........(GET |HTTP/|POST |HEAD )/\n\1/g'

stdbuf -oL -eL /usr/sbin/tcpdump -A -s 10240 "tcp port 11700 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" | egrep -a --line-buffered ".+(GET |HTTP/|POST )|^[A-Za-z0-9-]+: " | perl -nle 'BEGIN{|=1} { s/.*?(GET |HTTP\/[0-9.]* |POST )/\n1/g; print }'

ngrep -q -d eth0 -W byline host 10.135.x.x and (117.136.x.x or 202.104.x.x) and port 80 or port 8089 or port 11211 or port 3478

ngrep -W byline service/java-rns port 8500 -d any -c 1000 -q

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容