• 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

    • I think it is more to do with the wider channels, so more data can be sent at the same time, not about frequencies. No doubt some other things as well.
    • UniGetUI 3.3.0 by Razvan Serea UniGetUI is an application whose main goal is to create an intuitive GUI for the most common CLI package managers for Windows 10 and Windows 11, such as Winget, Scoop and Chocolatey. With UniGetUI, you'll be able to download, install, update and uninstall any software that's published on the supported package managers — and so much more. UniGetUI features Install, update and remove software from your system easily at one click: UniGetUI combines the packages from the most used package managers for windows: WinGet, Chocolatey, Scoop, Pip, Npm and .NET Tool. Discover new packages and filter them to easily find the package you want. View detailed metadata about any package before installing it. Get the direct download URL or the name of the publisher, as well as the size of the download. Easily bulk-install, update or uninstall multiple packages at once selecting multiple packages before performing an operation Automatically update packages, or be notified when updates become available. Skip versions or completely ignore updates in a per-package basis. Manage your available updates at the touch of a button from the Widgets pane or from Dev Home pane with UniGetUI Widgets. The system tray icon will also show the available updates and installed package, to efficiently update a program or remove a package from your system. Easily customize how and where packages are installed. Select different installation options and switches for each package. Install an older version or force to install a 32bit architecture. [But don't worry, those options will be saved for future updates for this package] Share packages with your friends to show them off that program you found. Here is an example: Hey @friend, Check out this program! Export custom lists of packages to then import them to another machine and install those packages with previously-specified, custom installation parameters. Setting up machines or configuring a specific software setup has never been easier. Backup your packages to a local file to easily recover your setup in a matter of seconds when migrating to a new machine UniGetUI 3.3.0 release notes: This release was expected to be 3.2.1, but it incudes more changes than planned, so it has been named 3.3.0 instead. Changelog Added default install options on a per-package-manager level! Added pre/post-install/update/uninstall commands! Added an option to close/kill process(es) before installing/updating/uninstalling a package Added cloud package backup and restore (via GitHub) more info on that here. Added the option to bulk-download installers Added the option to select package manager executable PowerShell7 can now clear older versions when updating to a new one Improvements to InstallOptions dialogs Installer download will properly guess the downloaded file name. Added "Dependencies" field to Package Details. Improvements to WinGet source management Searchbox has been moved to the titiebar, less wasted space Improvements for when window size is less wide Toolbar improvements Improvements on internal error detection and handling YAML and XML can't be created no more (more info on that here: #3860) Lots of bugfixes Other internal improvements Security enhancements Some features (pre/post install commands, command-line arguments, etc.) will be restricted by default. Bundles will also have those features restricted by default. Those features can be enabled with toggles that require an UAC prompt to be modified Bundles will show a security report when potentially dangerous settings are present. Fix some potential command-injection vulnerabilities from custom command-line arguments What's changed Load translations from Tolgee by @martinet101 in #3644 Dynamic JSON [de]serialization by @marticliment in #3679 Bump vedantmgoyal9/winget-releaser from 3e78d7ff0f525445bca5d6a989d31cdca383372e to 19e706d4c9121098010096f9c495a70a7518b30f in the actions-deps group by @dependabot[bot] in #3711 Update Scoop nirsoft bucket URL to ScoopInstaller/Nirsoft by @hboyd2003 in #3719 Per-package-manager and global default installation options by @marticliment in #3685 Further improvements to InstallOptions by @marticliment in #3721 Add toggle to enable/disable insecure settings by @marticliment in #3722 Make 'Pause updates for' submenu item use translation by @szumsky in #3705 Add toggle to enable/disable insecure settings by @marticliment in #3723 Separe Install, update and uninstall custom command-line args by @marticliment in #3748 Warn the user when a bundle contains potentially harmful prefs by @marticliment in #3749 Setting keys will be stored on const strings by @marticliment in #3750 Improve local icon detection code comments by @mrixner in #3767 Pre-install and post-install operations by @marticliment in #3756 Show Version in Update Live Dialog by @mrixner in #3798 Clear older versions of PowerShell7 modules on update by @marticliment in #3810 Allow Executable Selection by @mrixner in #3703 Add dependencies field to Package Details by @marticliment in #3822 Feat/recheck version before update by @theguy000 in #3827 feat: Add Cloud Backup and Restore via GitHub Gists by @theguy000 in #3826 Bundles file size improvements by @marticliment in #3832 Move searchbox to titlebar by @marticliment in #3837 Fix crashes & better error handling by @marticliment in #3859 Improvements to WinGet source management by @marticliment in #3876 Allow the user to force user gsudo via a SecureSetting (fix #3692) by @marticliment in #3877 Improvements to Toolbar by @marticliment in #3882 Download: UniGetUI 3.3.0 | 53.3 MB (Open Source) Links: WingetUI Home Page | GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • You wouldn't buy a car if you had to disassemble half the vehicle to do an oil change. The same is true in software. There comes a point where company A's desire to maximize profits hurts consumers.
    • RoboForm 9.7.8 by Razvan Serea RoboForm is the top-rated Password Manager and Web Form Filler that completely automates password entering and form filling. RoboForm makes logging into Web sites and filling forms faster, easier, and more secure. RoboForm memorizes and securely stores each user name and password the first time you log into a site, then automatically supplies them when you return. RoboForm's powerful Logins feature eliminates the manual steps of logging into any online account. With just one click RoboForm will navigate to a Web site, enter your username and password and click the submit button for you. Completing long registration or checkout forms is also a breeze. Simply click on your RoboForm Identity and RoboForm fills-in the entire form for you. You no longer need to remember all your passwords. You remember one Master Password, and RoboForm remembers the rest. This allows you to use stronger passwords, making your online experience more secure. RoboForm uses strong AES encryption for complete data security. The all new RoboForm comes with Chrome and Safari browser support, iPhone/iPad and Android support, as well a brand new RoboForm Everywhere license for use on unlimited computers and mobile devices. RoboForm 9.7.8 changelog: Fixed misc bugs in RF Desktop Unlock UI. Fixed a crash when RoboForm data folder does not exist. Download: RoboForm 9.7.8 | 42.3 MB (Free, paid upgrade available) View: RoboForm Website Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Elephants, vegetarians, eat raw yams, Otherwise, never eat..
  • Recent Achievements

    • One Month Later
      Ricky Chan earned a badge
      One Month Later
    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
    • One Month Later
      Ian_ earned a badge
      One Month Later
    • Dedicated
      MacDaddyAz earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      506
    2. 2
      ATLien_0
      207
    3. 3
      Michael Scrip
      205
    4. 4
      Xenon
      141
    5. 5
      +FloatingFatMan
      116
  • Tell a friend

    Love Neowin? Tell a friend!