Advertisement
RiCON

dgnv keygen

Mar 19th, 2011
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.45 KB | None | 0 0
  1. use strict;
  2. use bigint;
  3. use Win32::IPHelper;
  4.  
  5. #lolrsa
  6. #in the app:
  7. #we found that n = 1A83F7CC1575DCCB59FDC77701E8713C4DEBABECEA715F1CB42575EFD7B963995 = 191892820193403451984594735322549457953943917542866379325485688078096355703189
  8. #factored to the following with msieve
  9. #p = 339543489182227951777179066602142842201
  10. #q = 565149461871782271459562271294598687389
  11. #public exponent was set to 3 in the app (a common e)
  12. #using p, q, and e, d was calc'd usign euclid as 127928546795602301323063156881699638635359483061208246068165964493466409449067 = 11AD4FDD63A3E8879153DA4F569AF62817968D05BBC6FA7E6FD62C5811179366B
  13.  
  14.  
  15. my $power = 0x11AD4FDD63A3E8879153DA4F569AF62817968D05BBC6FA7E6FD62C5811179366B;
  16. my $mod = 0x1A83F7CC1575DCCB59FDC77701E8713C4DEBABECEA715F1CB42575EFD7B963995;
  17. my @AI;
  18. my @mac;
  19.  
  20. Win32::IPHelper::GetAdaptersInfo(\@AI);
  21. foreach(@AI) {
  22.     if($_->{IpAddressList}->[0]->{IpAddress} ne "0.0.0.0") {
  23.         foreach($_->{Address} =~ m/../g) {
  24.             push(@mac, hex($_));
  25.         }
  26.         last;
  27.     }
  28. }
  29.  
  30. my $hwid = ((($mac[1] ^ $mac[5]) << 24) + (($mac[0] ^ $mac[4]) << 16) + ($mac[3] << 8) + $mac[2]) ^ 0x395016DF; #lol directly copied from the asm
  31. my $num = hex(sprintf("6BBBBBBB%08X1047BBBBBBBBBBBBBBBBBBBBBBBBBBBBD89033CC", $hwid));
  32. my $key = substr($num->bmodpow($power, $mod)->as_hex(), 2);
  33.  
  34. printf("Key is: %s\n", $key);
  35. open (my $file, ">", "license.txt");
  36. print $file $key;
  37. close ($file);
  38.  
  39. print("License file written.\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement