Get users mac address | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Get users mac address

I have a c# program which I want to sell on my website...I want to make it so that when someone clicks the buy button, their Mac address is sent to me, then I edit the program so that if the PC it is running on does not have that Mac address, if will close

25th Jul 2017, 12:50 AM
NewbCoderšŸ˜ŽšŸ˜ŽšŸ’ŖšŸ’ŖšŸ‘…āœŒšŸ‘ˆ
NewbCoderšŸ˜ŽšŸ˜ŽšŸ’ŖšŸ’ŖšŸ‘…āœŒšŸ‘ˆ - avatar
1 Resposta
+ 8
As far as I'm concerned there's no standard JavaScript API for getting a MAC address. [ See the full list of APIs: https://www.w3.org/standards/techs/js#w3c_all ] Actually, access to this information is restricted because the MAC address uniquely identifies the device so it would be a security vulnerability if you were able to do this directly from JavaScript. Alternative ways to get the MAC address: šŸ‘‰ Use a Java applet and call it with JavaScript, but it would need to be signed and have a policy file [ Reference: https://stackoverflow.com/questions/4467905/getting-mac-address-on-a-web-page-using-a-java-applet ] šŸ‘‰ External components like ActiveX for IE, XPCOM for FireFox installed as an extension. Alternative ideas to get a unique identifier: šŸ‘‰ Get the private IP address using JavaScript [ Reference: http://ourcodeworld.com/articles/read/257/how-to-get-the-client-ip-address-with-javascript-only ] šŸ‘‰ Create a unique identifier yourself using some cryptographic algorithm and store it in a cookie. šŸ‘‰ Extremely persistent cookies in a browser [ Like Evercookie API: http://samy.pl/evercookie/ ]
25th Jul 2017, 9:59 PM
Pao
Pao - avatar