-2

I have a portable executable program, I want to make a mac address verification process. If the mac address is the same then the program should run and if the mac address does not match the program should exit. How do I do that? I want to have one executable file

Thanks

Aefits
  • 3,399
  • 6
  • 28
  • 46
  • Maybe think about this a bit more. Which MAC address do you want? Any PC, laptop or server in 2018 is going to have more than one (and often 6 or more). Type in ipconfig /all on your own machine and count all the different "physical address" values you see. – Adam G May 06 '18 at 10:41
  • you didn't get it , i have a mac address, and i want the program to run on this machine which have the mac address, – Mahmoud Dabash May 06 '18 at 10:51
  • Oh I get it alright. In a previous life I had a licensing system which used MAC address as a factor. But as I mentioned, a machine doesn't have *a* MAC address. You cannot ask if *the* MAC address is the same and more than I can ask whether a list==6. We moved away from using MAC address in this purpose. IP4 and IP6 are likely to have separate MAC addresses. CAT5 and WiFi, also different. 2.4GHz and 5GHz, also different. Install virtualization software and you will probably get another 10 virtual adapters. Also VMWare (etc) allows you to fake whatever MAC address you want. – Adam G May 06 '18 at 11:07
  • yes i knew that already, but i want to use MAC address ( string line) to run the exe program only on my pc , incase someone stole it , it will not work , so i need procedures to do this, thanks – Mahmoud Dabash May 06 '18 at 11:09

1 Answers1

0

the right way for making your application available for a certain people is using a key license,

take a look here: License

but if you insist using a MAC address, you can use this answer from another thread here: Answer

Dor Lugasi-Gal
  • 1,430
  • 13
  • 35
  • thanks for your answer, there's a way to add this code to an existed exe? – Mahmoud Dabash May 06 '18 at 13:28
  • You can decompile your application using dotPeek decompiler (.NET), export it to a project and then add your code. by the way, mac addresses refer to a network interface controllers, so you would see only one if you have only 1 network card and no bluetooth constrollers on your computer – Dor Lugasi-Gal May 07 '18 at 13:18