您的位置:首页 > 其它

#Wireshark#关于实验应用抓包的结果

2016-06-25 23:08 120 查看


在我的实验中,默认的flask REST API是开启5000端口,然而,当我用request库或者浏览器的REST客户端发送数据,wireshark抓的包都是如下结果:



可以看到图中的IPA协议的相关行,IPA后面跟着的是unknown,我就很纳闷,为何基于HTTP传输的JSON数据会显示unknown,协议不是HTTP而是IPA。经过google,查到了以下回答:

"IPA" is the ip.access "GSM over IP" protocol. That protocol apparently uses ports 3002, 3003, 3006, 4249, 4250, and 5000 over TCP. The ip.access dissector doesn't check whether the packets handed to it look like ip.access packets, so traffic that's not ip.access traffic but that's to or from one of those ports might be incorrectly dissected as ip.access traffic

也就是说,当端口为5000,就算这个数据包不是GSM over IP的,只是端口为5000也会认为是GOP包,因此抓包的结果是这样。

那么只有修改REST API的端口才能实现抓到HTTP包,修改如下:

app.run(host='0.0.0.0',port=9100)

增加了port这一个参数。

这是修改后的抓包结果:



那几行HTTP包就是与API交互的包。

参考:https://ask.wireshark.org/questions/9240/data-which-has-been-sent-over-tcpip-has-been-recognized-by-wireshark-as-ipa-protocol
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  wireshark