function Clean_AccountToken($AccountTokenTemplate, $AccountTockenBase64Decode = false) { $AccountTokenTemplate = str_replace_json("\\n\\\";", "\\\"", $AccountTokenTemplate); $AccountTokenTemplate = str_replace_json(";", ",", $AccountTokenTemplate); $AccountTokenTemplate = str_replace_json(" = ", " : ", $AccountTokenTemplate); if ($AccountTockenBase64Decode == true) { $AccountTokenTemplate = json_decode($AccountTokenTemplate, true); } else { $AccountTokenTemplate = $AccountTokenTemplate; } return $AccountTokenTemplate; }
// Define & Create Directories. if (isset($_POST['AppleSerialNumber'])) { $Request_Path = ACTIVATION_BLOB . DS . $_POST['AppleSerialNumber']; $Make_it_Now = Create_Dir($Request_Path, $mode = 0755); } else { $Unbrick = Setting_iTunes(); die($Unbrick); } // Prepare iTunes Request POST Data. file_put_contents($Request_Path . DS . "deviceActivation_Ticket_Request.json", json_encode($_POST, JSON_PRETTY_PRINT)); file_put_contents($Request_Path . DS . "deviceActivation_Ticket_Request.serialized", serialize($_POST)); $FirstPlist = file_get_contents($Request_Path . DS . "deviceActivation_Ticket_Request.json"); $SecondPlist = file_get_contents($Request_Path . DS . "deviceActivation_Ticket_Request.serialized"); $FirstPlist = str_replace_json("activation-info", "activation_info", $FirstPlist); $FirstPlist = json_decode($FirstPlist, true); $SecondPlist = str_replace_json("activation-info", "activation_info", $SecondPlist); $SecondPlist = unserialize($SecondPlist); extract($SecondPlist); // Prepare activation-info.plist File. file_put_contents($Request_Path . DS . "activation-info.plist", $activation_info); if (strpos($activation_info, 'DOCTYPE') !== false) { $activation_info = $parser->parse($activation_info); } else { $activation_info = $parser->parse(Plist_Wrapper($activation_info)); } extract($activation_info); // Prepare ActivationInfoXML.plist File. $ActivationInfoDEC = base64_decode($ActivationInfoXML); file_put_contents($Request_Path . DS . "ActivationInfoXML.plist", $ActivationInfoDEC); $ActivationInfoDEC = $parser->parse($ActivationInfoDEC); extract($ActivationInfoDEC);
$activation_info_base64 = base64_decode($_POST['activation-info-base64']); $Message .= "iTunes post = doulCi Hack" . "\n"; } elseif (isset($_POST['activation-info'])) { $Request_Path = ACTIVATION_BLOB . "iOS_8.0"; $Make_it_Now = Create_Dir($Request_Path, $mode = 0755); $Message .= "iTunes post = iOS 8.0 and Up" . "\n"; } else { $Unbrick = Setting_iTunes(); $Message .= "iTunes post = Error" . "\n"; die($Unbrick); } // Prepare iTunes Request POST Data. file_put_contents($Request_Path . DS . "deviceActivation_Ticket_Request.json", json_encode($_POST)); file_put_contents($Request_Path . DS . "deviceActivation_Ticket_Request.serialized", serialize($_POST)); $deviceActivation = file_get_contents($Request_Path . DS . "deviceActivation_Ticket_Request.serialized"); $deviceActivation = str_replace_json("activation-info", "activation_info", $deviceActivation); $deviceActivation = unserialize($deviceActivation); if (isset($_POST['activation-info-base64'])) { $activation_info = $activation_info_base64; } else { extract($deviceActivation); } // Prepare activation-info.plist File. file_put_contents($Request_Path . DS . "activation-info.plist", $activation_info); if (strpos($activation_info, 'DOCTYPE') !== false) { $activation_info = $parser->parse($activation_info); $Message .= "Plist parse = Normal" . "\n"; } else { $activation_info = $parser->parse(Plist_Wrapper($activation_info)); $Message .= "Plist parse = Wrapped" . "\n"; }
} if (isset($_POST['IMEI'])) { unset($_POST['IMEI']); } if (isset($_POST['IMSI'])) { unset($_POST['IMSI']); } if (isset($_POST['MEID'])) { unset($_POST['MEID']); } if (isset($_POST['CTN'])) { unset($_POST['CTN']); } // Send the Original iTunes Request to the Remote Server. $CertificateInfoXML = cURLgetData(APPLE_ALBERT_CERTIFYME, USER_AGENT_CERTIFYME); $CertificateInfoXML = str_replace_json("certify-me-info", "certify_me_info", $CertificateInfoXML); $CertificateInfoXML = @$parser->parse(XML_Wrapper($CertificateInfoXML)); if (!$CertificateInfoXML) { $CertificateInfoXML = @$parser->parse(Plist_Wrapper($CertificateInfoXML)); if (!$CertificateInfoXML) { // Setting the Default Header Type. header(CONTENT_TEXT); header("HTTP/1.1 501 Not Implemented"); echo "CM Method not implemented"; die; } } @extract($CertificateInfoXML); // Preparing to Hack the AccountTo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