• 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

    • Yeah the cookie consent is required for even displaying ads.
    • Reddit takes legal action, says Anthropic trained Claude on Reddit posts without permission by David Uzondu Reddit has filed a complaint against Anthropic, alleging the AI company straight-up stole its content to train AI models, including the Claude chatbot, without paying a dime. The lawsuit, lodged on June 4, 2025, in San Francisco, accuses Anthropic of repeatedly violating Reddit's User Agreement, which explicitly prohibits unauthorized commercial exploitation and automated scraping of its platform. The data on Reddit seems to be very valuable, seeing as the platform is already making bank licensing its content to other big AI players like Google and OpenAI, as mentioned in its complaint. These deals are reportedly worth tens of millions annually, so it's understandable why Reddit would be ###### if Anthropic was just taking the goods for free. Reddit has been quite clear that while its platform is open for community, it has rules, and commercial outfits cannot just waltz in and use user-generated content to build billion-dollar enterprises without permission or compensation. According to Reddit, Anthropic has been scraping its content since at least December 2021, ignoring technical measures like robots.txt designed to prevent such automated access. Reddit claims that in July 2024, Anthropic falsely stated it had stopped its bots from accessing Reddit, when audit logs allegedly showed Anthropic's bots hit Reddit's servers over a hundred thousand more times in the following months. The complaint on page 5 even includes a screenshot of Reddit's lawyers chatting with Claude, where the AI "confirms" it was trained on Reddit data. Now, we don't know how true this is, given the fact that LLMs hallucinate a lot. Reddit's legal filing paints Anthropic as a company with "two faces": one that publicly preaches about ethical AI and respecting boundaries, and another that privately ignores rules to line its pockets. Reddit is not holding back in what it is asking the court to do to Anthropic. The company demands significant monetary compensation, aiming to recover any profits Anthropic made from using Reddit's data, get repaid for its own financial losses, and it is also seeking punitive damages, looking to punish Anthropic for what Reddit describes as willful and malicious conduct. In addition to that, the company is also seeking an injunction designed to permanently stop Anthropic from using any Reddit data. This order would also compel Anthropic to delete all Reddit content from its systems and pull any AI technology, like its Claude chatbot, from commercial use if it was developed using this disputed data. On top of all that, Reddit wants Anthropic to cover all its legal expenses, including attorneys' fees and court costs.
  • Recent Achievements

    • Reacting Well
      James courage Tabla earned a badge
      Reacting Well
    • 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
  • Popular Contributors

    1. 1
      +primortal
      344
    2. 2
      snowy owl
      167
    3. 3
      +FloatingFatMan
      163
    4. 4
      ATLien_0
      161
    5. 5
      Xenon
      128
  • Tell a friend

    Love Neowin? Tell a friend!