Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- printf("This is MBAM 3.x Keygen/Batch script generator for Wget");
- printf("\n");
- printf("\n");
- function read_stdin()
- {
- $fr=fopen("php://stdin","r");
- $input = fgets($fr,64);
- $input = rtrim($input);
- fclose ($fr);
- return $input;
- }
- printf("Enter MBAM 3.x Keystone Server Authorization Token : ");
- global $ksauthtok;
- $ksauthtok = read_stdin();
- printf("Enter MBAM 3.x Installation Token : ");
- global $insttok;
- $insttok = read_stdin();
- printf("\n");
- printf("Enter how long keygen will generate keys for batch script (in seconds) : ");
- $gentime = read_stdin();
- set_time_limit($gentime);
- printf("\n");
- printf("Generating batch script \"mbam3_key_dumper.bat\"\n");
- printf("Please wait till command prompt window close after " . $gentime . " seconds...\n");
- loop:
- $array = generate();
- function generate()
- {
- global $ksauthtok;
- global $insttok;
- $digilist = "0123456789ABCDEFGHJKLMNPQRTUVWXY";
- $ip = gethostbyname('keystone.mwbsys.com');
- $long = ip2long($ip);
- $ipenc = md5($long);
- $id = NULL;
- $id .= substr($digilist, rand(5, 9), 1);
- $id .= substr($digilist, rand(10, 20), 1);
- $id .= substr($digilist, rand(21, 31), 1);
- $id .= substr($digilist, rand(1, 4), 1);
- $id .= substr($long, rand(5, 9), 1);
- $st = md5('Licensed');
- $duration = md5('Lifetime');
- $hash = md5($id);
- $i = 0;
- $key = "";
- for ($i; $i < 32; $i+=2)
- {
- $nextdigit = hexdec(substr($hash, $i, 2)) & 31;
- if ((($i % 8) == 0) && ($i > 0))
- {
- $key .= "".substr($digilist, $nextdigit,1);
- }
- else
- {
- $key .= substr($digilist, $nextdigit, 1);
- }
- }
- $array = array($ksauthtok, $insttok, $id, $key);
- $fp = fopen('mbam3_key_dumper.bat', 'a');
- 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");
- fclose($fp);
- return $array;
- }
- goto loop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement