唯一的、持久的网络设备信息

发布于 2024-10-07 03:11:06 字数 737 浏览 7 评论 0原文

我一直在尝试编写一个应用程序,该应用程序能够通过 rndis 或 wifi 连接到网络设备并执行一些简单的操作。

更重要的是,我希望能够通过任一连接方法找到我之前连接过的设备。我最初以为我只是检查以前见过的 mac 地址,但我发现 rndis mac 地址和 wifi mac 地址不匹配。我在 Windows 上,所以我尝试的下一件事是使用 nbtstat -A 和 ping -a,但这些也没有出现任何独特的东西(我想我可能会得到一个设备名称,但它似乎没有一)。

所以我的问题是,是否有任何工具(最好适用于 Windows),它允许我检索有关网络设备的某种独特信息,以便我再次找到它?我在这一领域没有丰富的经验,所以我不确定具体是什么,但我希望有一种方法可以在仅连接到一个网络适配器时获取两个网络适配器的 MAC 地址,或者也许使用不同的工具来查找我错过的设备名称。

感谢您提供的任何建议,我真的很感激。抱歉,如果我太罗嗦了。

编辑:以防我含糊不清。我通过 RNDIS 或 WIFI 从我的台式电脑反复连接到外部设备。我的目标是无论使用何种连接方法都能够一致地识别网络设备。

编辑:通过网络设备,我的意思是我有运行unix操作系统的小型独立设备(例如手机或平板电脑),我通过wifi或rndis从Windows桌面访问这些设备,并且我希望能够一致地识别。例如,我可能想使用此工具连接到两部手机中的一部,并能够识别它是哪一部,以便我可以回忆起之前使用该设备执行的操作。所以我正在寻找的是我可用的手机的唯一(或半唯一)属性,该属性在通过 rndis 或 wifi 访问时是一致的。

I've been trying write an application which will be able to connect to a network device via rndis or over wifi and perform some simple operations.

The kicker is that I want to be able to find a device I've connected to before, through either connection method. I initially figured I'd just check for a previously seen mac address, but I discovered that the rndis mac address and the wifi mac address don't match. I'm on windows so the next thing I tried was to use nbtstat -A and ping -a, but those didn't turn up anything unique either (I figured I might get a device name, but it doesn't seem to have one).

So my question is, is there any tool (ideally available for windows), which will allow me to retrieve some sort of unique information about a network device that will allow me to find it again? I don't have a huge amount of experience in this field so I'm not sure exactly what that would be, but I hoped that there may be a way to get the mac addresses for both network adapters while only connected to one, or perhaps use a different tool to find a device name that I'd missed.

Thank you for any advice you might give, I really appreciate it. Sorry if I'm overly wordy.

EDIT: In case I've been ambiguous. I am connecting repeatedly to an external device via RNDIS or WIFI from my desktop PC. My goal is to be able to consistently recognize the network device regardless of the connection method used.

EDIT: By networked device, I mean that I have small independant devices (such as cell phones or tablets) running a unix os, which I access from my Windows desktop via wifi or rndis, and that I would like to be able to consistently identify. So for example I might want to use this tool to connect to one of two cell phones and be able to recognize which one it is so I can recall previous operations performed with that device. So what I'm looking for is a unique (or semi unique) attribute of the cellphone available to me that is consistent when accessed via rndis or wifi.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伊面 2024-10-14 03:11:06

您可以使用内置的 ipconfig 命令获取 MAC 地址(以及一堆其他网络接口信息),并稍后解析其输出:

ipconfig /all

或者,如果您只需要 MAC 地址,请尝试 getmac代码>.

You can get MAC address (and bunch of other network interface info) with built-in ipconfig command and parse its output later:

ipconfig /all

Alternatively, if MAC address is all you need, try getmac.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文