fork download
  1. <?php
  2. $serial= $_POST["C39S95UQHFYC"];
  3. $guid= $_POST["guid"];
  4. $activation= $_POST["activation-info"];
  5.  
  6. //---------------------------------------------------------------------------------------------------------------//
  7. $base_url = 'localhost';
  8.  
  9. if(!isset($activation))
  10. {
  11. echo 'Activation info not found!';
  12. }
  13. //-Load-e-Decode-XML-Inf-----------------------------------------------------------------------------------------//
  14. $encodedrequest = new DOMDocument;
  15. $encodedrequest->loadXML($activation);
  16. $activationDecoded= base64_decode($encodedrequest->getElementsByTagName('data')->item(0)->nodeValue);
  17.  
  18. $decodedrequest = new DOMDocument;
  19. $decodedrequest->loadXML($activationDecoded);
  20. $nodes = $decodedrequest->getElementsByTagName('dict')->item(0)->getElementsByTagName('*');
  21.  
  22. for ($i = 0; $i < $nodes->length - 1; $i=$i+2)
  23. {
  24. switch ($nodes->item($i)->nodeValue)
  25. {
  26. case "ActivationRandomness": $activationRamdomess = $nodes->item($i + 1)->nodeValue; break;
  27. case "ActivationState": $ActivationState = $nodes->item($i + 1)->nodeValue; break;
  28. case "BasebandMasterKeyHash": $BasebandMasterKeyHash = $nodes->item($i + 1)->nodeValue; break;
  29. case "DeviceCertRequest": $deviceCertRequest=base64_decode($nodes->item($i + 1)->nodeValue); break;
  30. case "DeviceClass": $deviceClass=strtolower($nodes->item($i + 1)->nodeValue); break;
  31. case "IntegratedCircuitCardIdentity": $IntegratedCircuitCardIdentity = $nodes->item($i + 1)->nodeValue; break;
  32. case "UniqueDeviceID": $uniqueDiviceID = $nodes->item($i + 1)->nodeValue; break;
  33. case "InternationalMobileEquipmentIdentity": $imei = $nodes->item($i + 1)->nodeValue; break;
  34. case "ProductType": $ProductType = $nodes->item($i + 1)->nodeValue; break;
  35. case "ProductVersion": $ProductVersion = $nodes->item($i + 1)->nodeValue; break;
  36. case "UniqueChipID": $UniqueChipID = $nodes->item($i + 1)->nodeValue; break; }}
  37.  
  38. //-Variant-accountToken------------------------------------------------------------------------------------------//
  39. $activityURL = "https://a...content-available-to-author-only...e.com/deviceservices/activity";
  40. $certificateURL = "https://a...content-available-to-author-only...e.com/deviceservices/certifyMe";
  41. $phoneNumberNotificationURL = "https://a...content-available-to-author-only...e.com/WebObjects/ALUnbrick.woa/wa/phoneHome";
  42. $wildcardTicket = file_get_contents('certs/wildcardTicket.pem');
  43.  
  44. //-Diretorios----------------------------------------------------------------------------------------------------//
  45. $dir_decoded = 'decoded';
  46. $dir_cert = 'devicecerts';
  47. //-DECODED-------------------------------------------------------------------------------------------------------//
  48. if (!is_dir("requests/".$deviceClass.'/'.$serial.'/'.$dir_decoded.'/')){
  49. mkdir("requests/".$deviceClass.'/'.$serial.'/'.$dir_decoded.'/', 0777, true);}
  50. //-DEVICECERTS---------------------------------------------------------------------------------------------------//
  51. if (!is_dir("requests/".$deviceClass.'/'.$serial.'/'.$dir_cert.'/')){
  52. mkdir("requests/".$deviceClass.'/'.$serial.'/'.$dir_cert.'/', 0777, true);}
  53.  
  54. //-Save-XML-Request-----------------------------------------------------------------------------------------------//
  55. $encodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/ActivationInfoComplete.xml');
  56. $decodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/'.$dir_decoded.'/ActivationInfoXML.xml');
  57. $encodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/'.$uniqueDiviceID.'.xml');
  58. $decodedrequest->save('requests/'.$deviceClass.'/'.$serial.'/'.$dir_decoded.'/'.$uniqueDiviceID.'.xml');
  59. file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/deviceCertRequest.crt',$deviceCertRequest);
  60. file_put_contents('certs/deviceCertRequest.crt',$deviceCertRequest);
  61. //---------------------------------------------------------------------------------------------------------------//
  62. $privkey = array(file_get_contents('certs/iPhoneDeviceCA_private.pem'),"minacriss");
  63. $mycert = file_get_contents('certs/iPhoneDeviceCA.pem');
  64. $params = array('config' => 'C:/xampp/htdocs/deviceservices/deviceActivation/openssl.cnf');
  65.  
  66. $usercert = openssl_csr_sign($deviceCertRequest,$mycert,$privkey,365, $params, '6');
  67. openssl_x509_export($usercert,$certout);
  68. file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/DeviceCertificate.crt',$certout);
  69. $deviceCertificate=base64_encode($certout);
  70. file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/DeviceCertificate-Base64.pem',$deviceCertificate);
  71. file_put_contents('certs/DeviceCertificate.crt',$certout);
  72. file_put_contents('certs/DeviceCertificate-Base64.pem',$deviceCertificate);
  73.  
  74. //-accounToken-----------------------------------------------------------------------------------------------------//
  75. $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".'}';
  76. file_put_contents('requests/'.$deviceClass.'/'.$serial.'/'.$dir_cert.'/accountToken.pem',$accountToken);
  77. $accountTokenBase64=base64_encode($accountToken);
  78. file_put_contents('certs/accountToken.pem',$accountToken);
  79. $pkeyid = openssl_pkey_get_private(file_get_contents("certs/private_key.pem"));
  80.  
  81. //-AccountTokenSignature-----------------------------------------------------------------------------------------//
  82. openssl_sign($accountTokenBase64, $signature, $pkeyid);
  83.  
  84. //-Free-KEY------------------------------------------------------------------------------------------------------//
  85. openssl_free_key($pkeyid);
  86. $accountTokenSignature = base64_encode($signature);
  87.  
  88. //---------------------------------------------------------------------------------------------------------------//
  89. $accountTokenCertificate_decod = file_get_contents('certs/AccountTokenCertificate.pem');
  90. $accountTokenCertificate = base64_encode($accountTokenCertificate_decod);
  91.  
  92. //-FairPlayKeyData-----------------------------------------------------------------------------------------------//
  93. $fairPlayKeyData = file_get_contents('certs/FairPlayKeyData.pem');
  94.  
  95. //-activation_record.plist---------------------------------------------------------------------------------------//
  96. $activation_record = 'file_get_contents("certs/activation_record.plist");
  97. <?xml version="1.0" encoding="UTF-8"?>
  98. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://w...content-available-to-author-only...e.com/DTDs/PropertyList-1.0.dtd">
  99. <plist version="1.0">
  100. <dict>
  101. <key>AccountToken</key>
  102. <data>'.$accountTokenBase64.'</data>
  103. <key>AccountTokenCertificate</key>
  104. <data>'.$accountTokenCertificate.'</data>
  105. <key>AccountTokenSignature</key>
  106. <data>'.$accountTokenSignature.'</data>
  107. <key>DeviceCertificate</key>
  108. <data>'.$deviceCertificate.'</data>
  109. <key>FairPlayKeyData</key>
  110. <data>'.$fairPlayKeyData.'</data>
  111. <key>LDActivationVersion</key>
  112. <integer>2</integer>
  113. </dict>
  114. </plist>
  115. ';
  116. file_put_contents('requests/'.$deviceClass.'/'.$serial.'activation_record.plist',$activation_record);
  117. ?>
  118.  
  119. <!DOCTYPE html>
  120. <html>
  121. <head>
  122. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  123. <meta name="keywords" content="iTunes Store" />
  124. <meta name="description" content="iTunes Store" />
  125. <title>iPhone Activation</title>
  126. <link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/shared/common-min.css" charset="utf-8" rel="stylesheet" />
  127. <link href="http://s...content-available-to-author-only...e.com/deviceservices/stylesheets/styles.css" charset="utf-8" rel="stylesheet" />
  128. <link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/pages/IPAJingleEndPointErrorPage-min.css" charset="utf-8" rel="stylesheet" />
  129. <script id="protocol" type="text/x-apple-plist">
  130. <plist version="1.0">
  131. <dict>
  132. <key>'.$deviceClass.'-activation</key>
  133. <dict>
  134. <key>activation-record</key>
  135. <dict>
  136. <key>AccountToken</key>
  137. <data>'.$accountTokenBase64.'</data>
  138. <key>AccountTokenCertificate</key>
  139. <data>'.$accountTokenCertificate.'</data>
  140. <key>AccountTokenSignature</key>
  141. <data>'.$accountTokenSignature.'</data>
  142. <key>DeviceCertificate</key>
  143. <data>'.$deviceCertificate.'</data>
  144. <key>FairPlayKeyData</key>
  145. <data>'.$fairPlayKeyData.'</data>
  146. </dict>
  147. <key>ack-received</key>
  148. <false/>
  149. <key>show-settings</key>
  150. <true/>
  151. <key>unbrick</key>
  152. <false/>
  153. </dict>
  154. </dict>
  155. </plist>
  156. </script>
  157. <script>var protocolElement = document.getElementById("protocol");var protocolContent = protocolElement.innerText;iTunes.addProtocol(protocolContent);</script>
  158. </head>
  159. <body>
  160. </body>
  161. </html>
  162.  
  163. <!DOCTYPE html>
  164. <html>
  165. <head>
  166. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  167. <meta name="keywords" content="iTunes Store" />
  168. <meta name="description" content="iTunes Store" />
  169. <title>iPhone Activation</title>
  170. <link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/shared/common-min.css" charset="utf-8" rel="stylesheet" />
  171. <link href="http://s...content-available-to-author-only...e.com/deviceservices/stylesheets/styles.css" charset="utf-8" rel="stylesheet" />
  172. <link href="http://s...content-available-to-author-only...e.com/ipa_itunes/stylesheets/pages/IPAJingleEndPointErrorPage-min.css" charset="utf-8" rel="stylesheet" />
  173. <script id="protocol" type="text/x-apple-plist"><plist version="1.0">
  174. <dict>
  175. <key>iPhone-activation</key>
  176. <dict>
  177. <key>ack-received</key>
  178. <false/>
  179. <key>show-settings</key>
  180. <true/>
  181. <key>unbrick</key>
  182. <false/>
  183. </dict>
  184. </dict>
  185. </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>
  186. <td class="x">Statusi i aktivizimit:</td>
  187. <td class="y"><?php echo $ActivationState; ?></td>
  188. <td class="x">Lloji i produktit:</td>
  189. <td class="y"><?php echo $ProductType; ?><td>
  190. <td class="x">Versioni iOS:</td>
  191. <td class="y"><?php echo $ProductVersion; ?></td>
  192. </table>
  193. Twitter <a href="http://w...content-available-to-author-only...r.com/ALLMyWORLD2" target="_blank" style="text-decoration:none;color:#115fbf;">@ALLMyWORLD2</a></p>
  194. </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 &copy; 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 &amp; Conditions</a></div></div></div></body></html>
Success #stdin #stdout #stderr 0.03s 25880KB
stdin
Standard input is empty
stdout
Activation info not found!
stderr
PHP Notice:  Undefined index: C39S95UQHFYC in /home/JAVPVu/prog.php on line 2
PHP Notice:  Undefined index: guid in /home/JAVPVu/prog.php on line 3
PHP Notice:  Undefined index: activation-info in /home/JAVPVu/prog.php on line 4