Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use bigint;
- use Win32::IPHelper;
- #lolrsa
- #in the app:
- #we found that n = 1A83F7CC1575DCCB59FDC77701E8713C4DEBABECEA715F1CB42575EFD7B963995 = 191892820193403451984594735322549457953943917542866379325485688078096355703189
- #factored to the following with msieve
- #p = 339543489182227951777179066602142842201
- #q = 565149461871782271459562271294598687389
- #public exponent was set to 3 in the app (a common e)
- #using p, q, and e, d was calc'd usign euclid as 127928546795602301323063156881699638635359483061208246068165964493466409449067 = 11AD4FDD63A3E8879153DA4F569AF62817968D05BBC6FA7E6FD62C5811179366B
- my $power = 0x11AD4FDD63A3E8879153DA4F569AF62817968D05BBC6FA7E6FD62C5811179366B;
- my $mod = 0x1A83F7CC1575DCCB59FDC77701E8713C4DEBABECEA715F1CB42575EFD7B963995;
- my @AI;
- my @mac;
- Win32::IPHelper::GetAdaptersInfo(\@AI);
- foreach(@AI) {
- if($_->{IpAddressList}->[0]->{IpAddress} ne "0.0.0.0") {
- foreach($_->{Address} =~ m/../g) {
- push(@mac, hex($_));
- }
- last;
- }
- }
- my $hwid = ((($mac[1] ^ $mac[5]) << 24) + (($mac[0] ^ $mac[4]) << 16) + ($mac[3] << 8) + $mac[2]) ^ 0x395016DF; #lol directly copied from the asm
- my $num = hex(sprintf("6BBBBBBB%08X1047BBBBBBBBBBBBBBBBBBBBBBBBBBBBD89033CC", $hwid));
- my $key = substr($num->bmodpow($power, $mod)->as_hex(), 2);
- printf("Key is: %s\n", $key);
- open (my $file, ">", "license.txt");
- print $file $key;
- close ($file);
- print("License file written.\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement