Obtaining MAC code from a computer in B3D
Blitz3D Forums/Blitz3D Programming/Obtaining MAC code from a computer in B3D
| ||
Anyone exercised this option within their application? Just wondering about using it as a software protection option - might have to configure some sorta database to allow folk to submit a request for a license key, just one option I'm considering. |
| ||
Something like this? http://security.stackexchange.com/questions/1118/can-i-block-based-on-mac-address Consensus seems to be that it's a bad idea and not really worth pursuing. It sounds like you need to grossly violate user privacy for even mediocre success and a savvy end user will still work around it with ease. |
| ||
Thanks for the feedback Yasha, that is along the lines I was hoping for |
| ||
I read that. It's interesting. " If you could determine the MAC, that would be a pretty big privacy violation. Since your MAC address arguably identifies you uniquely on the globe,... " " Blocking an attacker by MAC would be the same as blocking him/her by cookie because it is controlled by the client. " I barely understand networking stuff, except for what I read here. ;----------- I coded a customized DLL for Blitz3D to return your MAC addresses. This successfully returned the physical addresses of both the Wireless LAN adapter and Ethernet adapter on my machine; Your results will be similar. You can download my zipped code, [ BB + DLL + decls ] from this link ( Remember to put the decls file in the "UserLibs" directory. ) :: http://uploadingit.com/file/ghomrc2ak3gvzth1/MACaddr.zip ( sample program output screen: ) ![]() Aha! Did you really think I'd show you my MAC address. ![]() The Blitz3D program is very simple, as follows: ;; The "getMAC()" function returns a different MAC address each time it's called, ;; and returns an empty string ("") when it's out of data. Print" Your MAC physical addresses are :: " mac$ = "" For z=1 To 10 mac = getMAC() If Len(mac)=0 Then Exit Print " "+mac Next Print:Print:Print Print" Touch a key to end. " WaitKey():End |
| ||
thank's for sharing i used blitz.sys to get the HardDrive ID and used that as key. http://www.melog.ch/dl/blitzsys_v105.zip this sample code grabs the hard drive id on a text file: Include "incluir\blitzsys.bb" DebugLog "volume serial: "+Hex(DLLGetVolumeInfo("C:\",VOL_GETVOLUMESERIAL)) out = WriteFile("id.dat") WriteLine out, "volume serial: "+Hex(DLLGetVolumeInfo("C:\",VOL_GETVOLUMESERIAL)) CloseFile out Print "press a key..." WaitKey End |
| ||
Thanks for the feedback folks, really appreciated. |