在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
ngrep 是grep的网络版,他力求更多的grep特征,用于搜寻指定的数据包。由于安装ngrep需用到ibpcap库, 所以支持大量的操作系统和网络协议,能识别TCP、UDP和ICMP包。 安装ngrep 复制代码 代码如下:git clone git://git.code.sf.net/p/ngrep/code ngrep-code 进入目录 复制代码 代码如下:cd ngrep-code ./configure --with-pcap-includes=/usr/local/include/pcap make make install 选项 -h is help/usage
捕获所有post请求(加个-W byline 参数后,将解析包中的换行符): 复制代码 代码如下:ranger@ranger:~$ sudo ngrep -q -W byline "(POST).*" interface: eth0 (192.168.122.0/255.255.254.0) match: (POST).* T 192.168.122.74:46048 -> 140.207.228.58:80 [A] POST /Hotel/OTA_HotelSearch.asmx?wsdl HTTP/1.1. Content-Type: text/xml; charset=UTF-8. SOAPAction: http://ctrip.com/Request. Accept-Encoding: gzip, deflate. Content-Length: 1330. Accept: */*. Accept-Language: zh-cn. User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0). UA-CPU: x86. Accept-Encoding: gzip, deflate. Connection: close. Host: openapi.ctrip.com. . <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Request xmlns="http://ctrip.com/"> <requestXML><Request> <Header AllianceID="***" SID="***" TimeStamp="1393554304685" RequestType="OTA_HotelSearch" Signature="B166CDF5422A6DA5BA81A08036E938E7"/> <HotelRequest> <RequestBody xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ns:OTA_HotelSearchRQ Version="1.0" PrimaryLangID="zh" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelSearchRQ.xsd" |
请发表评论