• 0

get remote mac address using c#


Question

9 answers to this question

Recommended Posts

  • 0
  jak0bk said:
Simple Answer: You can't.

Complex answer: You can, but you need to read the output from "arp -a" command. That might get difficult, depending on how many connections you currently have through your NIC (wireless or wired).

586598222[/snapback]

Simpler answer: yes, you can.

You can use WMI to query a remote computer for its MAC.

https://www.neowin.net/forum/index.php?showtopic=342321&st=0

  • 0

shouldn't you just be able to use the arp protocol itself to broadcast out an arp reply for getting a mac address from an ip address? i mean, that's what the protocol is there for. also there is r-arp. which gets you the ip address from the mac address.

and i'm nto talking about specific programs that come with an os. i mean the actual protocol that is part of the tcp/ip suite. you should read up on network level programming for this. i know of it, but dont know how to do it myself so i can't help you more then just to point you in the general direction....

  • 0
  nonsence said:
shouldn't you just be able to use the arp protocol itself to broadcast out an arp reply for getting a mac address from an ip address? i mean, that's what the protocol is there for. also there is r-arp. which gets you the ip address from the mac address.

and i'm nto talking about specific programs that come with an os. i mean the actual protocol that is part of the tcp/ip suite. you should read up on network level programming for this. i know of it, but dont know how to do it myself so i can't help you more then just to point you in the general direction....

586601876[/snapback]

Yes, you can do it that way, however, what if you want to store only the MAC someplace? If you shell out, you redirect the entire output to a file. With WMI, you can be more selective.

  • 0

WMI is supposed to be what Microsofts answer to SNMP is. and yes you do need certain priviledges to get information. and i think it will only work for Windows based systems that run the WMI services, which aren't installed by default.

i think if you wanna do this right, you should stick to the tcp/ip standards and figure out how to use to arp protocol to quiry remote systems. I know of packet sniffers that can do this, and programs that build a list of computers on the network, and list their info based on ip, dns/netbios and mac addess. but i dont know the programming behind how they do it.

  • 0
  nonsence said:
WMI is supposed to be what Microsofts answer to SNMP is. and yes you do need certain priviledges to get information. and i think it will only work for Windows based systems that run the WMI services, which aren't installed by default.

i think if you wanna do this right, you should stick to the tcp/ip standards and figure out how to use to arp protocol to quiry remote systems. I know of packet sniffers that can do this, and programs that build a list of computers on the network, and list their info based on ip, dns/netbios and mac addess. but i dont know the programming behind how they do it.

586603957[/snapback]

I'm pretty sure WMI is installed by default starting with 2000. It's a simple way. But, yeah, using TCP/IP would be better for a mixed environment.

Here: http://www.c-sharpcorner.com/Code/2003/Jun...cketSniffer.asp

  • 0
  weenur said:
I'm pretty sure WMI is installed by default starting with 2000. It's a simple way. But, yeah, using TCP/IP would be better for a mixed environment.

Here: http://www.c-sharpcorner.com/Code/2003/Jun...cketSniffer.asp

586605934[/snapback]

Thanks guys for all your help, but I'm looking for the c# code to get a remote mac address without using WMI.

Anyone any ideas?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • "Can" is fine. I want the ability for it to "not." Actually, I would prefer vice versa. But it has to be optional, otherwise companies wouldn't be too happy.
    • ChatGPT can now connect to Outlook, Teams, Gmail, Google Drive, and other services by Pradeep Viswanathan Apart from regular consumers, ChatGPT is also growing fast among business users. In fact, OpenAI now has 3 million paying (Enterprise, Team, and Edu) business users, up from 2 million in February. During a live stream today targeted toward business users, OpenAI announced that ChatGPT can now connect to more external services to pull in real-time context and provide more useful responses for users. The following are some of the external connectors available in ChatGPT Deep Research for Plus, Pro, Team, Enterprise, and Edu users: Microsoft Outlook Microsoft Teams Microsoft SharePoint Dropbox Box Google Drive Gmail Liner In addition to the above, IT admins in organizations can now build custom ChatGPT connectors using the popular Model Context Protocol (MCP). These custom connectors will allow organizations to make use of the data available inside their proprietary systems and other apps within ChatGPT, alongside pre-built connectors. Today, the ChatGPT team also announced a new feature called record mode for ChatGPT Team users on macOS. The record mode feature will allow users to capture meeting audio and get meeting transcriptions, meeting action items, summaries, etc. ChatGPT record mode will also be available to Plus, Pro, Enterprise, and Edu users in the future. Kevin Weil, Chief Product Officer at OpenAI, tweeted the following regarding today’s launch: While ChatGPT's new connectors and features mark significant progress, it faces a formidable challenge in the enterprise market against Microsoft 365 Copilot, which enjoys native integration within the Microsoft 365 ecosystem.
    • I decided to give this a try and, wow. I like it. One of the most customizable browsers I've ever used I think, and it even has the classic menu bar. That's one of the reasons I've stuck with Firefox for so long. Not sure if I'll make this my main browser yet but it's looking good so far.
    • No messaging app from a large commercial entity is really encrypted to a point they are actually unable to access your content. If you trust whatsapp and friends to do this either you are a fool.
    • From my point of view this seems like a good thing? Option to pay as you go in an otherwise Subscription app? Yes Please! Free Windsurf + BYOK = Now I have a reason to try Windsurf.
  • Recent Achievements

    • Apprentice
      DarkShrunken went up a rank
      Apprentice
    • Dedicated
      CHUNWEI earned a badge
      Dedicated
    • Collaborator
      DarkShrunken earned a badge
      Collaborator
    • Rookie
      Pat-Garrett went up a rank
      Rookie
    • Week One Done
      Outdoor Saunaio earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      330
    2. 2
      snowy owl
      165
    3. 3
      +FloatingFatMan
      158
    4. 4
      ATLien_0
      154
    5. 5
      Xenon
      127
  • Tell a friend

    Love Neowin? Tell a friend!