如何确定 Wireshark 中的哪个数据包与我通过 Postman 发送的数据包相对应? [英] How can I determine which packet in Wireshark corresponds to what I sent via Postman?

查看:24
本文介绍了如何确定 Wireshark 中的哪个数据包与我通过 Postman 发送的数据包相对应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚为什么从我的手持设备(Windows CE/Compact Framework)发送的 REST 调用没有发送到我的服务器应用程序(在我的 PC 上运行的常规、成熟的 .NET 应用程序).

I'm trying to figure out why REST calls sent from my handheld device (Windows CE / Compact Framework) are not making it to my server app (regular, full-fledged .NET app running on my PC).

手持设备与 PC 已连接 - 我知道因为我可以在 PC 的 Windows 资源管理器中看到手持设备,Windows Mobile 设备中心会验证两者之间的连接是否有效等.

The handheld device and the PC are connected - I know that because I can see the handheld device in the PC's Windows Explorer, Windows Mobile Device Center verifies the connection between the two is valid, etc.

当我通过 Postman 传递相同的 REST 调用时,我在我的 PC 上运行的服务器应用程序上到达断点,即:

I reach the breakpoint on my server app running on my PC when I pass the same REST call via Postman, namely:

http://192.168.125.50:21609/api/inventory/sendXML/duckbill/platypus/poisontoe

...但从手持设备调用时不会.

...but not when calling the same from the handheld device.

所以,我想在wireshark 中查看邮递员发送的内容,以便在尝试从手持设备调用相同的REST 方法时查看要查找的内容.

So, I want to see in wireshark just what is being sent from postman, so I can see what to look for when attempting to call the same REST method from the handheld device.

我在wireshark中设置了一个过滤器,即ip.dst == 192.168.125.50",通过Postman调用该方法时得到了一些结果,但我看不到端口21609"这是我所期望的.如果我看到这个,我会知道我在看正确的数据包,但是......它在哪里?当我运行 Postman 并拨打电话时,Wireshark 捕获了四个数据包,并且没有一个将其作为用户数据报协议"元素中的端口号.

I set up a filter in wireshark, namely "ip.dst == 192.168.125.50" and get a handful of results when calling the method via Postman, but nowhere do I see "port 21609" which I would expect to. If I saw this, I would know I was looking at the right packet, but...where is it? When I run Postman and make the call, there are four packets captured by Wireshark, and none of them give that as the port number in the "User Datagram Protocol" element.

如果忽略端口号,我如何确定哪个数据包是来自 Postman 的?

If the port number is disregarded, how can I determine which packet is the one from Postman?

Yoel 有一个好主意;我添加了Dest port (unresolved)"和Sourceport"作为要显示的列.

Yoel had a good idea; I added "Dest port (unresolved)" and "Sourceport" as columns to display.

然后我在 Wireshark 中开始了新的实时捕获,并从 Postman 发送了 URL/REST 方法.

I then started a new live capture in Wireshark and sent the URL / REST method from Postman.

服务器应用程序中的断点确实被命中.我通过 F5 并停止了 Wireshark 捕获.

The breakpoint in the server app was indeed hit. I F5'd through it, and stopped the Wireshark capture.

21609"在任何地方的 Dest Port 列中都看不到.

"21609" is not seen in the Dest Port column anywhere.

为什么?URL 是如何发送的,但 Wireshark 没有检测到它被定向到的端口?

Why? How is the URL being sent, and yet Wireshark is not detecting the port to which it was directed?

此外,在 Wireshark 的协议"列中,我看不到HTTP"条目.

Also, in the Protocol column in Wireshark, I see no "HTTP" entries.

推荐答案

要在数据包列表中查看目标端口,您必须通过右键单击列标题并选择列首选项来添加列....然后点击+号,选择列标题,放

To see the destination port in the packet list, you have to add a column by right clicking in a column header and selecting Column preferences.... Then click on the + sign, choose a column title, and put

tcp.dstport

作为 Fields 参数.

您也可以直接使用带有表达式的显示过滤器:

You can also directly use the display filter with the expression:

tcp.dstport == 21609

(使用 Wireshark 2.2.0 测试)

(tested with Wireshark 2.2.0)

这篇关于如何确定 Wireshark 中的哪个数据包与我通过 Postman 发送的数据包相对应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆