0

I have an application which is working with generated licence (Mac-Id and some other hardware adresses). Everything works fine but if the user changes the internet connection from cable internet to Wlan connection or vice versa it gives a licence error. I know mac address will be changed if the internet connection is changed.

Is there a known solution ?

Any idea for this problem would be appreciated.

  • For example by not using the MAC address of the active adapter, but concatenating all MAC address of all adapters on the system? – CodeCaster Feb 12 '14 at 12:46
  • 2
    @CodeCaster - and then they plug in a 3G dongle, or unplug it, and suddenly their license is invalid again. Or they connect a VPN. The answer is surprisingly simpler than this - stop using the MAC address at all. It's not a good proxy for "the machine" – Damien_The_Unbeliever Feb 12 '14 at 12:56

2 Answers2

2

Using mac address is not a good idea cause users can change it manually. In your case Wireless NIC and Ethernet NIC has two different MAC addresses, So you should remember which one you used or not use MAC address at all.

Mehraban
  • 3,164
  • 4
  • 37
  • 60
  • If your answer was just the last part of the last sentence, I'd +1 it. MAC addresses are just not a good proxy for machine identity. – Damien_The_Unbeliever Feb 12 '14 at 12:57
  • 1
    I have mentioned it in very first sentence of my answer. However, the question here is not to advice best practice but how to handle the situation described. – Mehraban Feb 12 '14 at 13:00
  • It's not just users changing them manually that can cause MAC addresses to disappear or appear, and whichever one the code "remembers" as having selected can easily be one that disappears. – Damien_The_Unbeliever Feb 12 '14 at 13:31
  • Yes, you're right. I just thought about security aspect of it. – Mehraban Feb 12 '14 at 13:37
0

I think you could enumerate all MAC address instead of using the MAC address of the active connection.

Also, this large post about How are Software License Keys generated? is quite worth a look.

Community
  • 1
  • 1
Rene Hilgers
  • 390
  • 3
  • 13