<?php
$serial= $_POST["C39S95UQHFYC"];
$guid= $_POST["guid"];
$activation= $_POST["activation-info"];
//---------------------------------------------------------------------------------------------------------------//
$base_url = 'localhost';
{
echo 'Activation info not found!';
}
//-Load-e-Decode-XML-Inf-----------------------------------------------------------------------------------------//
$encodedrequest = new DOMDocument;
$encodedrequest->loadXML($activation);
$activationDecoded= base64_decode($encodedrequest->getElementsByTagName('data')->item(0)->nodeValue);
$decodedrequest = new DOMDocument;
$decodedrequest->loadXML($activationDecoded);
$nodes = $decodedrequest->getElementsByTagName('dict')->item(0)->getElementsByTagName('*');
for ($i = 0; $i < $nodes->length - 1; $i=$i+2)
{
switch ($nodes->item($i)->nodeValue)
{
case "ActivationRandomness": $activationRamdomess = $nodes->item($i + 1)->nodeValue; break;
case "ActivationState": $ActivationState = $nodes->item($i + 1)->nodeValue; break;
case "BasebandMasterKeyHash": $BasebandMasterKeyHash = $nodes->item($i + 1)->nodeValue; break;
case "DeviceCertRequest": $deviceCertRequest=base64_decode($nodes->item($i + 1)->nodeValue); break; case "DeviceClass": $deviceClass=strtolower($nodes->item($i + 1)->nodeValue); break; case "IntegratedCircuitCardIdentity": $IntegratedCircuitCardIdentity = $nodes->item($i + 1)->nodeValue; break;
case "UniqueDeviceID": $uniqueDiviceID = $nodes->item($i + 1)->nodeValue; break;
case "InternationalMobileEquipmentIdentity": $imei = $nodes->item($i + 1)->nodeValue; break;
case "ProductType": $ProductType = $nodes->item($i + 1)->nodeValue; break;
case "ProductVersion": $ProductVersion = $nodes->item($i + 1)->nodeValue; break;
case "UniqueChipID": $UniqueChipID = $nodes->item($i + 1)->nodeValue; break; }}
//-Variant-accountToken------------------------------------------------------------------------------------------//
$activityURL = "https://a...content-available-to-author-only...e.com/deviceservices/activity";
$certificateURL = "https://a...content-available-to-author-only...e.com/deviceservices/certifyMe";
$phoneNumberNotificationURL = "https://a...content-available-to-author-only...e.com/WebObjects/ALUnbrick.woa/wa/phoneHome";
//-Diretorios----------------------------------------------------------------------------------------------------//
$dir_decoded = 'decoded';
$dir_cert = 'devicecerts';
//-DECODED-------------------------------------------------------------------------------------------------------//
if (!is_dir("requests/".$deviceClass.'/'.$serial.'/'.$dir_decoded.'/')){ mkdir("requests/".$deviceClass.'/'.$serial.'/'.$dir_decoded.'/', 0777, true);} //-DEVICECERTS---------------------------------------------------------------------------------------------------//
if (!is_dir("requests/".$deviceClass.'/'.$serial.'/'.$dir_cert.'/')){ mkdir("requests/".$deviceClass.'/'.$serial.'/'.$dir_cert.'/', 0777, true);}
//-Save-XML-Request-----------------------------------------------------------------------------------------------//
$encodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/ActivationInfoComplete.xml');
$decodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/'.$dir_decoded.'/ActivationInfoXML.xml');
$encodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/'.$uniqueDiviceID.'.xml');
$decodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/'.$dir_decoded.'/'.$uniqueDiviceID.'.xml');
file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/deviceCertRequest.crt',$deviceCertRequest); //---------------------------------------------------------------------------------------------------------------//
$params = array('config' => 'C:/xampp/htdocs/deviceservices/deviceActivation/openssl.cnf');
$usercert = openssl_csr_sign($deviceCertRequest,$mycert,$privkey,365, $params, '6'); file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/DeviceCertificate.crt',$certout); file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/DeviceCertificate-Base64.pem',$deviceCertificate);
//-accounToken-----------------------------------------------------------------------------------------------------//
$accountToken='{'."\n\t".'"InternationalMobileEquipmentIdentity" = "'.$imei.'";'."\n\t".'"ActivityURL" = "'.$activityURL.'";'."\n\t".'"ActivationRandomness" = "'.$activationRamdomess.'";'."\n\t".'"UniqueDeviceID" = "'.$uniqueDiviceID.'";'."\n\t".'"CertificateURL" = "'.$certificateURL.'";'."\n\t".'"PhoneNumberNotificationURL" = "'.$phoneNumberNotificationURL.'";'."\n\t".'"WildcardTicket" = "'.$wildcardTicket.'";'."\n".'}';
file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/accountToken.pem',$accountToken);
//-AccountTokenSignature-----------------------------------------------------------------------------------------//
//-Free-KEY------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------//
$accountTokenCertificate_decod = file_get_contents('certs/AccountTokenCertificate.pem'); $accountTokenCertificate = base64_encode($accountTokenCertificate_decod);
//-FairPlayKeyData-----------------------------------------------------------------------------------------------//
//-activation_record.plist---------------------------------------------------------------------------------------//
$activation_record = 'file_get_contents("certs/activation_record.plist");
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://w...content-available-to-author-only...e.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AccountToken</key>
<data>'.$accountTokenBase64.'</data>
<key>AccountTokenCertificate</key>
<data>'.$accountTokenCertificate.'</data>
<key>AccountTokenSignature</key>
<data>'.$accountTokenSignature.'</data>
<key>DeviceCertificate</key>
<data>'.$deviceCertificate.'</data>
<key>FairPlayKeyData</key>
<data>'.$fairPlayKeyData.'</data>
<key>LDActivationVersion</key>
<integer>2</integer>
</dict>
</plist>
';
file_put_contents('requests/'.$deviceClass.'/'.$serial.'activation_record.plist',$activation_record); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="iTunes Store" />
<meta name="description" content="iTunes Store" />
<title>iPhone Activation</title>
<link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/shared/common-min.css" charset="utf-8" rel="stylesheet" />
<link href="http://s...content-available-to-author-only...e.com/deviceservices/stylesheets/styles.css" charset="utf-8" rel="stylesheet" />
<link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/pages/IPAJingleEndPointErrorPage-min.css" charset="utf-8" rel="stylesheet" />
<script id="protocol" type="text/x-apple-plist">
<plist version="1.0">
<dict>
<key>'.$deviceClass.'-activation</key>
<dict>
<key>activation-record</key>
<dict>
<key>AccountToken</key>
<data>'.$accountTokenBase64.'</data>
<key>AccountTokenCertificate</key>
<data>'.$accountTokenCertificate.'</data>
<key>AccountTokenSignature</key>
<data>'.$accountTokenSignature.'</data>
<key>DeviceCertificate</key>
<data>'.$deviceCertificate.'</data>
<key>FairPlayKeyData</key>
<data>'.$fairPlayKeyData.'</data>
</dict>
<key>ack-received</key>
<false/>
<key>show-settings</key>
<true/>
<key>unbrick</key>
<false/>
</dict>
</dict>
</plist>
</script>
<script>var protocolElement = document.getElementById("protocol");var protocolContent = protocolElement.innerText;iTunes.addProtocol(protocolContent);</script>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="iTunes Store" />
<meta name="description" content="iTunes Store" />
<title>iPhone Activation</title>
<link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/shared/common-min.css" charset="utf-8" rel="stylesheet" />
<link href="http://s...content-available-to-author-only...e.com/deviceservices/stylesheets/styles.css" charset="utf-8" rel="stylesheet" />
<link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/pages/IPAJingleEndPointErrorPage-min.css" charset="utf-8" rel="stylesheet" />
<script id="protocol" type="text/x-apple-plist"><plist version="1.0">
<dict>
<key>iPhone-activation</key>
<dict>
<key>ack-received</key>
<false/>
<key>show-settings</key>
<true/>
<key>unbrick</key>
<false/>
</dict>
</dict>
</plist></script><script>var protocolElement = document.getElementById("protocol");var protocolContent = protocolElement.innerText;iTunes.addProtocol(protocolContent);</script></head><body><div id="jingle-page-wrapper"><div id="jingle-page-wrapper-header"><div id="secure"><img src="http://s...content-available-to-author-only...e.com/ipa_itunes/images/lock.png"/></div><div id="banner"><div id="apple-logo"><img src="http://s...content-available-to-author-only...e.com/ipa_itunes/images/apple_chrome.png"/></div><div id="carrier-logo"></div></div></div><div id="jingle-page-wrapper-content"><form method="post" id="jingle-page-form" action=https://a...content-available-to-author-only...e.com/deviceservices/deviceActivation><div id="jingle-page-content"><div id="IPAJingleEndPointErrorPage"><h1>Urime! Pajisja лshtл hapur.</h1><p>Pлr tл impostuar dhe sinkronizuar kлtл iPhone, kliko Vazhdo.</p> <p>
<td class="x">Statusi i aktivizimit:</td>
<td class="y"><?php echo $ActivationState; ?></td>
<td class="x">Lloji i produktit:</td>
<td class="y"><?php echo $ProductType; ?><td>
<td class="x">Versioni iOS:</td>
<td class="y"><?php echo $ProductVersion; ?></td>
</table>
Twitter <a href="http://w...content-available-to-author-only...r.com/ALLMyWORLD2" target="_blank" style="text-decoration:none;color:#115fbf;">@ALLMyWORLD2</a></p>
</div></div></form><div id="ContinueButtonForm"><form method="post" id="ContinueButtonForm" action=http://a...content-available-to-author-only...e.com/deviceservices/showSettings/showSettings.php><div id="form-submit-buttons"><input type="submit" value="Vazhdo" id="form-submit-buttons-left"/></div></form></div></div></div><div id="jingle-page-wrapper-footer"><div id="footer"><div id="legal">Copyright © 2012 Apple Inc. All rights reserved.| <a target="_blank" href="http://w...content-available-to-author-only...e.com/legal/iphone/us/privacy/">Privacy Policies</a>| <a target="_blank" href="http://w...content-available-to-author-only...e.com/legal/iphone/us/terms/">Terms & Conditions</a></div></div></div></body></html>