Author |
Message |
Oliver Bock
| Posted on Monday, November 08, 2004 - 11:56 pm: | |
If I use demo1.exe (from 4.03), with seeds 1, 2 and 3, and the license ID 'LICENSEID', demo1.exe generates a non-expiring registration code of 8BE29D090A2C7C0D80D8 The registration code works. However when I use the following PERL code: $regobj = new Regware(1, 2, 3); print $regobj->GenerateCode('LICENSEID', 0) . "\n"; I get a registration code 5F9543EA4EA403 which does not work in demo1.exe's Check Expiration. It is also noticeably short. Can anyone get PERL to generate the correct registration code? I have tested this on OS X 10.3.6 and whatever Linux my ISP has. (If I pass the PERL generator a number of days until expiry then it generates a registration code of the correct length (20), but it still does not match the one generated by demo1.exe.) |
Winston Kotzan (Wak)
| Posted on Tuesday, November 09, 2004 - 12:51 pm: | |
This problem may be related to the expiration date. Please post the code that appears if you enter an expiration. Thanks. |
Oliver Bock
| Posted on Tuesday, November 09, 2004 - 4:39 pm: | |
If I give a 15 day expiry then the PERL generates 5CF2965E4A33EA4EA403 This code does not work in demo1. Demo1.exe generates: 8BE2960E0A237C0D80D8 |
Winston Kotzan (Wak)
| Posted on Tuesday, November 09, 2004 - 5:12 pm: | |
In the Perl script, did you call: $regobj->SetStorageValues('541D', '9C41', 'A460', '45B7'); That line should be set to the SEED_STORAGE values in reg400_opts.pas. |
Oliver Bock
| Posted on Tuesday, November 09, 2004 - 5:26 pm: | |
I was not calling SetStorageValues because it seemed that the defaults were the same as what was in ref400_opts.pas. I have now added the call, but the output is the same. |
Oliver Bock
| Posted on Tuesday, November 09, 2004 - 5:29 pm: | |
Interestingly, if I run the PERL on Windows 2000, it produces 5BF2965E4A33EA4EA403 which also does not work in demo1.exe. I am surprised that the output is different. Perhaps the PERL code does not consider the endian-ness of the hardware it is running on. |
Oliver Bock
| Posted on Tuesday, November 09, 2004 - 6:02 pm: | |
But perhaps it is just because the date might be localised on Windows and GMT on UNIX, or vice-versa. This might account for the small difference. |
Oliver Bock
| Posted on Tuesday, November 16, 2004 - 12:16 am: | |
I'm stuck here. My only (impractical) option is to rewrite the PERL script based on the Pascal code. Does _anyone_ have this PERL code working? |
Winston Kotzan (Wak)
| Posted on Tuesday, November 16, 2004 - 12:22 am: | |
The Perl script works. Its used on the WAK Productions website to handle software registrations. Hasn't had any problems yet. I believe your problem may be related to a configuration error... perhaps the setting of the seed values. Sorry for the inconvenience. |
Oliver Bock
| Posted on Tuesday, November 16, 2004 - 6:00 pm: | |
I looked at this again and it turned out that it was my own stupid fault. I had changed the date on my PC to test license expiration and had forgotten to set it back. I tried to exclude date issues while trying to make it work earlier, but failed because the PERL license generator does not work when $ExpireDays is zero (the default). I will suggest some changes to the PERL code in another post. |
|