Get MAC address only from internal ethernet connection
-
Hello to all, I am struggling to find a way to get MAC address ONLY from the ethernet card in my PC. It's easy when my PC is not connected on the VPN:
Function getMacAddress()
Dim nics() As NetworkInterface = _
NetworkInterface.GetAllNetworkInterfaces
Return nics(0).GetPhysicalAddress.ToString
End FunctionBut if it's already connected then the first (0) device is ethernet card of the server that I'm connected and my ethernet is second (1) device so I don't know how to determine. This is showed on the image on this link: https://postimg.org/image/4ndewjjhz/ Any help is very appreciated!
-
Hello to all, I am struggling to find a way to get MAC address ONLY from the ethernet card in my PC. It's easy when my PC is not connected on the VPN:
Function getMacAddress()
Dim nics() As NetworkInterface = _
NetworkInterface.GetAllNetworkInterfaces
Return nics(0).GetPhysicalAddress.ToString
End FunctionBut if it's already connected then the first (0) device is ethernet card of the server that I'm connected and my ethernet is second (1) device so I don't know how to determine. This is showed on the image on this link: https://postimg.org/image/4ndewjjhz/ Any help is very appreciated!
No, it's NOT the network interface of the server you're connected to. You cannot get remote MAC adresses. What you're getting is the MAC of the virtual network adapter created by the VPN software. Dump the data on all the adapters returned, not just the first one.\ MAC addresses are not assigned to machines. They are assigned by the manufactures of the network adapters, or a generated in software for the adapter. MAC's can NOT be used as a unique identifier for any purpose. They are NOT unique to any machine!
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
No, it's NOT the network interface of the server you're connected to. You cannot get remote MAC adresses. What you're getting is the MAC of the virtual network adapter created by the VPN software. Dump the data on all the adapters returned, not just the first one.\ MAC addresses are not assigned to machines. They are assigned by the manufactures of the network adapters, or a generated in software for the adapter. MAC's can NOT be used as a unique identifier for any purpose. They are NOT unique to any machine!
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
You didn't say thing about the type of app you're writing, but typically, I'd generate a GUID and send that to the client and it stores it appropriately, passing it back to the server as appropriate when needed.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
You didn't say thing about the type of app you're writing, but typically, I'd generate a GUID and send that to the client and it stores it appropriately, passing it back to the server as appropriate when needed.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakActually I have made an Windows Form application and I am trying to protect it by giving a specific activation code generated by some machine id or something like that. I read about many different ways of getting unique hardware serials but there is no perfect solution cause hardware components can be cloned or replaced. I agree with you about activation through server but I would like to make possibility to make also offline registration.
-
Actually I have made an Windows Form application and I am trying to protect it by giving a specific activation code generated by some machine id or something like that. I read about many different ways of getting unique hardware serials but there is no perfect solution cause hardware components can be cloned or replaced. I agree with you about activation through server but I would like to make possibility to make also offline registration.
Honestly, the copy protection problem has never been solved, by any vendor. It's a waste of your time and, more importantly, your customers time. My primary job is software repackaging for deployment in the enterprise environment. Trust me when I tell you, as a customer, licensing is a giant pain in the ass. Normally, vendors use the data submitted about the customer, such as company name, contact name, phone number, address, email address, and whatnot, run all that through an algorithm to generate a license key file. That license file is checked for validity by the application on launch. But, in all cases, if someone wanted to hack your app and take out the license validation, there's nothing you can do to stop them. DO NOT TRY AND "ROLL YOUR OWN" LICENSING SOLUTION. You'll end up making it ridiculously easy to break. Use a commercial solution. Google for "C# licensing framework".
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Honestly, the copy protection problem has never been solved, by any vendor. It's a waste of your time and, more importantly, your customers time. My primary job is software repackaging for deployment in the enterprise environment. Trust me when I tell you, as a customer, licensing is a giant pain in the ass. Normally, vendors use the data submitted about the customer, such as company name, contact name, phone number, address, email address, and whatnot, run all that through an algorithm to generate a license key file. That license file is checked for validity by the application on launch. But, in all cases, if someone wanted to hack your app and take out the license validation, there's nothing you can do to stop them. DO NOT TRY AND "ROLL YOUR OWN" LICENSING SOLUTION. You'll end up making it ridiculously easy to break. Use a commercial solution. Google for "C# licensing framework".
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak