使用 tcpdump,如何尽可能清楚地查看未加密的 SMTP 会话?
我正在尝试调试一个应用程序,但它不是一个方便运行 WireShark 的地方。
我一直在使用“tcpdump -nn -x -X port 25”,但输出并不是真正最方便的格式。想法?
I'm trying to debug an application and it isn't a place that's convenient to run WireShark.
I've been using "tcpdump -nn -x -X port 25" but the output isn't really in the most convenient format. Thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您始终可以使用“-w dump.txt -s 0”作为额外参数将 tcpdump 写入文件,然后将输出文件本地加载到 WireShark 中。
You can always have tcpdump write out to a file using "-w dump.txt -s 0" as extra arguments, and then load the output file into WireShark locally.
tcpdump -A
(而不是-X
)将以 ASCII 格式打印数据包内容。tcpdump -A
(instead of-X
) will print packet contents in ASCII.我认为最简单的做法是将应用程序指向 SMTP 代理,该代理将所有内容传递到真实服务器并同时记录它(可能会与 socat 几分钟后),但按照您当前的方法...
tcpdump
或 TShark 输出上使用 tcptrace。I'd think the easiest thing to do would be to point the application at a SMTP proxy which just passes everything through to the real server and logs it in the meantime (could probably hack something together with socat in a few minutes), but going with your current approach...
tcpdump
or TShark output.存在一个名为
ngrep
的实用程序,它可能会对您有所帮助。它具有常规 grep 的所有功能,但它适用于 pcap 数据。 在这里查看A utility known as
ngrep
exists which might help you. It has all the power of regular grep, but it works on pcap data. Check it out here