Advertisement
cigcag

MBAM3xKgWgetv1

Jul 9th, 2017
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.47 KB | None | 0 0
  1. <?php
  2.  
  3. printf("This is MBAM 3.x Keygen/Batch script generator for Wget");
  4. printf("\n");
  5. printf("\n");
  6.  
  7. function read_stdin()
  8. {
  9.     $fr=fopen("php://stdin","r");
  10.     $input = fgets($fr,64);
  11.     $input = rtrim($input);
  12.     fclose ($fr);
  13.     return $input;
  14. }
  15.  
  16. printf("Enter MBAM 3.x Keystone Server Authorization Token : ");
  17. global $ksauthtok;
  18. $ksauthtok = read_stdin();
  19.  
  20. printf("Enter MBAM 3.x Installation Token : ");
  21. global $insttok;
  22. $insttok = read_stdin();
  23.  
  24. printf("\n");
  25. printf("Enter how long keygen will generate keys for batch script (in seconds) : ");
  26. $gentime = read_stdin();
  27. set_time_limit($gentime);
  28.  
  29. printf("\n");
  30. printf("Generating batch script \"mbam3_key_dumper.bat\"\n");
  31. printf("Please wait till command prompt window close after " . $gentime . " seconds...\n");
  32.  
  33. loop:
  34.  
  35. $array = generate();
  36. function generate()
  37.     {
  38.         global $ksauthtok;
  39.         global $insttok;
  40.         $digilist = "0123456789ABCDEFGHJKLMNPQRTUVWXY";
  41.         $ip   = gethostbyname('keystone.mwbsys.com');
  42.         $long = ip2long($ip);
  43.         $ipenc = md5($long);
  44.         $id = NULL;
  45.         $id .= substr($digilist, rand(5, 9), 1);
  46.         $id .= substr($digilist, rand(10, 20), 1);
  47.         $id .= substr($digilist, rand(21, 31), 1);
  48.         $id .= substr($digilist, rand(1, 4), 1);
  49.         $id .= substr($long, rand(5, 9), 1);
  50.                 $st = md5('Licensed');
  51.         $duration = md5('Lifetime');
  52.         $hash = md5($id);
  53.         $i = 0;
  54.         $key = "";
  55.         for ($i; $i < 32; $i+=2)
  56.         {
  57.                 $nextdigit = hexdec(substr($hash, $i, 2)) & 31;
  58.                 if ((($i % 8) == 0) && ($i > 0))
  59.                 {
  60.                         $key .= "".substr($digilist, $nextdigit,1);
  61.                 }
  62.                 else
  63.                 {
  64.                         $key .= substr($digilist, $nextdigit, 1);
  65.                 }
  66.         }
  67.  
  68.         $array = array($ksauthtok, $insttok, $id, $key);
  69.         $fp = fopen('mbam3_key_dumper.bat', 'a');
  70.         fwrite($fp, "del /q " . $id . ".json && wget --no-check-certificate --header=\"Authorization:Token token=\\\"" . $ksauthtok . "\\\"\" --header=Connection:Close --header=Content-Type:application/json --header=User-Agent:MBAM-C/3.1.2.1733/consumer --post-data=\"{\\\"installation_token\\\":\\\"" . $insttok . "\\\",\\\"license_key\\\":\\\"" . $id . ":" . $key . "\\\",\\\"tags\\\":\\\"\\\"}\" https://keystone.mwbsys.com//api/v1/installations/redeem.json && ren redeem.json " . $id . ".json" . "\n");
  71.         fclose($fp);       
  72.         return $array;
  73.     }
  74.  
  75. goto loop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement