捕获 Facebook 聊天中传入的消息
我编写了 c# 程序,该程序在 pcap 文件中查找 facebook 消息。但现在它不起作用。
我的程序在 ipv4 数据包中查找
"application/json" and "\"msg\":{\"text\""
字符串。
但昨天我注意到没有再发送此类数据包。现在我可以通过搜索
"/ajax/chat/send.php"
But this string is only for outing messages 来区分 facebook 聊天数据包,而不是这些。对于传入的消息,我找不到任何关键字符串。 有什么想法吗?
I wrote a c# program which finds facebook messages in a pcap file. But now its not working.
My program looks for
"application/json" and "\"msg\":{\"text\""
strings in ipv4 packets.
But yesterday i noticed no such packets are sending anymore. Instead of these now i can distinguish facebook chat packets by searching for
"/ajax/chat/send.php"
But this string is only for outgoing messages. For incoming messages i couldnt find any key strings.
Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ipv4 数据包中的应用程序数据(HTTP 聊天数据)可能会被分段,即单个 ipv4 数据包可能不包含完整的字符串“application/json”或“\”msg\”:{\“text\””。
更好的方法是捕获更高级别的 HTTP 流量(由 pcap 准备)。以下是有关 HTTP 流量嗅探的相关信息 - https://serverfault.com/questions/84750/monitoring- http-traffic-using-tcpdump
通过 HTTP 流量转储,您可以以更一致的方式解析消息,并确保碎片不是问题
Application data (HTTP chat data) in ipv4 packets can be fragmented, i.e. single ipv4 packet may not contain full string "application/json" or "\"msg\":{\"text\"".
Better approach would be to capture higher level HTTP traffic (preparsed by pcap). Here's related information about HTTP traffic sniffing - https://serverfault.com/questions/84750/monitoring-http-traffic-using-tcpdump
Having HTTP traffic dump you can parse messages in more consistent fashion and be sure that fragmentation is not an issue