open-license-manager / licensecc

Software licensing, copy protection in C++. It has few dependencies and it's cross-platform.
http://open-license-manager.github.io/licensecc/
BSD 3-Clause "New" or "Revised" License
975 stars 310 forks source link

Different signature of same machine #108

Closed feeyman closed 4 years ago

feeyman commented 4 years ago

Hello,gcontini

I use this software on Ubuntu. I just restart the machine, but the generated host signature is different. Would you give me some suggestions?

image @gcontini

feeyman commented 4 years ago

The network configuration environment of the server is shown in the figure image

gcontini commented 4 years ago

Does the mac address of the first network adapter changes across reboots?

feeyman commented 4 years ago

Hello, thank you very much for your reply. I have bound the two network cards. Even if restart the machine, this address will not change. How can I check the MAC address of the first network card you mentioned? Is it using ifconfig? image

gcontini commented 4 years ago

I see it now. Well, it looks like a bug, and i may have found the cause. Please wait until next week-end when i've time to run the tests and fix it.

However... try also to download the newest version (use a fresh folder). Last Sunday I changed the default identification strategy to use the disk uuid first. It should be more stable.

feeyman commented 4 years ago

That's a good idea, but I used the latest version to generate the signature and authenticate it. It doesn't match. The signature is the same as the one generated using the MAC address. Did I download the wrong version? image

gcontini commented 4 years ago

the signature method changes depending if the code is in a vm or on a pc without any virtualization ("bare to metal"). i did the change for the "bare to metal" case.

see here: http://open-license-manager.github.io/open-license-manager/usage/Hardware-identifiers.html#hardware-identifier-generation And how to change it is here http://open-license-manager.github.io/open-license-manager/api/extend.html#tweak-hardware-signature-generator

So you can change it by yourself. The file "licensecc_properties.h" is generated, it isn't in the source code.

image

feeyman commented 4 years ago

OK, thanks a lot. I seem to get it.

gcontini commented 4 years ago

I've found a potential issue in the mac address identifier generation (the array was 8 characters long instead of 6). It should be solved by now.

feeyman commented 4 years ago

### Hello gcontini; Excuse me, for an issue with a label of 108, can it be solved only by modifying the array digits? Because 107 and 108 were submitted together, I was a bit confused. I used the previous version and only adjusted the array bits from 8 to 6. The bug still exists. Maybe it's not caused by this setting?

feeyman commented 4 years ago

@gcontini Hello, this is what happens when I try to restart many times. It doesn't change every time. Can you please confirm whether it is caused by the length of the array? 1 ABSW-kVBm-DgA= 2 ABSW-kVBm-DgA= 3 ABSW-kVBm-DAA= 4 ABSW-kVBm-DAA= 5 ABSW-kVBm-DgA= 6 ABSW-kVBm-DAA= 7 ABSW-kVBm-DgA= 8 ABSW-kVBm-DgA= 9 ABSW-kVBm-DAA= 10 ABSW-kVBm-DAA= 11 ABSW-kVBm-DAA= 12 ABSW-kVBm-DgA= 13 ABSW-kVBm-DgA= 14 ABSW-kVBm-DgA= 15 ABSW-kVBm-DAA= 16 ABSW-kVBm-DgA= 17 ABSW-kVBm-DgA= 18 ABSW-kVBm-DgA= 19 ABSW-kVBm-DAA= 20 ABSW-kVBm-DAA=

image