-
Notifications
You must be signed in to change notification settings - Fork 53
/
iboy.php
193 lines (164 loc) · 14.2 KB
/
iboy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?php
$activation= (array_key_exists('activation-info-base64', $_POST)
? base64_decode($_POST['activation-info-base64'])
: array_key_exists('activation-info', $_POST) ? $_POST['activation-info'] : '');
if(!isset($activation) || empty($activation)) { exit('make sure device is connected'); }
$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": $activationRandomness = $nodes->item($i + 1)->nodeValue; break;
case "DeviceClass": $deviceClass = $nodes->item($i + 1)->nodeValue; break;
case "SerialNumber": $serialNumber = $nodes->item($i + 1)->nodeValue; break;
case "UniqueDeviceID": $uniqueDiviceID = $nodes->item($i + 1)->nodeValue; break;
case "MobileEquipmentIdentifier": $meid = $nodes->item($i + 1)->nodeValue; break;
case "InternationalMobileEquipmentIdentity": $imei = $nodes->item($i + 1)->nodeValue; break;
case "ActivationState": $activationState = $nodes->item($i + 1)->nodeValue; break;
case "ProductVersion": $productVersion = $nodes->item($i + 1)->nodeValue; break;
}
}
$snLength = strlen($serialNumber);
if($snLength > 12){
echo "Hmmm something isn't right don't ya think?";
exit();
}
if($snLength < 11){
echo "Hmmm something isn't right dont ya think?";
exit();
}
$udidLength = strlen($uniqueDiviceID);
if($udidLength < 40){
echo "Hmmm something isn't right don't ya think?";
exit();
}
if($udidLength > 40){
echo "Hmmm something isn't right don't ya think?";
exit();
}
$devicefolder = $deviceClass.'/'.$serialNumber.'/';
if (!file_exists($deviceClass.'/')) mkdir($deviceClass.'/', 0777, true);
if (!file_exists($devicefolder)) mkdir($devicefolder, 0777, true);
$decodedrequest->save($devicefolder.'device-request-decoded.xml');
# -------------------------------------------- Sign account token -----------------------------------------
$accountToken2=
'{'.(isset($imei) ? "\n\t".'"InternationalMobileEquipmentIdentity" = "'.$imei.'";' : '').'
'.(isset($meid) ? "\n\t".'"MobileEquipmentIdentifier" = "'.$meid.'";' : '').
"\n\t".'"ActivityURL" = "https://albert.apple.com/deviceservices/activity";'.
"\n\t".'"ActivationRandomness" = "'.$activationRandomness.'";'.
"\n\t".'"UniqueDeviceID" = "'.$uniqueDiviceID.'";'.
"\n\t".'"SerialNumber" = "'.$serialNumber.'";'.
"\n\t".'"PhoneNumberNotificationURL" = "https://albert.apple.com/deviceservices/phoneHome";'.
"\n\t".'"ProposedTicket" = "MIICHAIBATALBgkqhkiG9w0BAQWgdzB1AzEAgn1X4NL5tuZIoIjDh5meADOm1sDvpHjtnI9OxfqdZlEDGLZMaeaPY6O+iD0xsB7TBEAaNS6IKhyHU2k9An41IulixP/uC3zWZOIqseSIUyRawhu7/emlH8rRXUWCRopOJks7LNaywlVGTUBGNf3LSRE4MW6fPwQkKcken0AE4QBaAJ9LFFSASxcGlMJDZKMdGYHornvS53uOn4drB5kAAYZyB0ifh20HmQABhnIHSJ+XOAczMTBWWlcAn5c9DAAAAADu7u7u7u7u75+XPgQBAAAAn5c/BAEAAACfl0AEAAAAAASBgKLIKQ5BrMkZh74IoXp54aESoz6VMZHiqvoBUIIOt/+lUqisfpGKOCqjBmE5X20sy6oTeRo9/wph/+BHPJacFE1CJfCMKITvJ2O4c8ZurHX23wOcEERvwCuSZ9gkDhVSm+veC4ZY84Cxma+owiuFquxltae//xxcj3Mv5DfUl6oAo4GdMAsGCSqGSIb3DQEBAQOBjQAwgYkCgYEA7To/ZNHoIJzBUgY0734vsgl+ACxDQ+f4quvmSrPAtgDENSZwaVrHXpF+cRKBABqkDa00YcENx2dtS1tuHLKDNn1zMZLaZRpiK9UeiMPNZL6mlg12BWLwVjlFOGED8U6pfXwOw6D/FCDRgvyGBn7wsw8sEa7AdlYmMHGmkvwgOP0CAwEAAQ==\n";'.
"\n\t".'"FactoryActivated" = "True";'.
"\n".
'}';
$accountToken=
'{'.(isset($imei) ? "\n\t".'"InternationalMobileEquipmentIdentity" = "'.$imei.'";' : '').'
'.(isset($meid) ? "\n\t".'"MobileEquipmentIdentifier" = "'.$meid.'";' : '').
"\n\t".'"ActivityURL" = "https://albert.apple.com/deviceservices/activity";'.
"\n\t".'"ActivationRandomness" = "'.$activationRandomness.'";'.
"\n\t".'"UniqueDeviceID" = "'.$uniqueDiviceID.'";'.
"\n\t".'"SerialNumber" = "'.$serialNumber.'";'.
"\n\t".'"FactoryActivated" = "True";'.
"\n".
'}';
$accountTokenBase64=base64_encode($accountToken);
$accountTokenBase642=base64_encode($accountToken2);
/*
The RSA Private Key that is required for iPhone Activation on iOS 7.1.2 must be one of the following:
1) iPhoneActivation.pem
2) FactoryActivation.pem
3) RaptorActivation.pem
4) Self-Signed iPhoneActivation.cer & iPhoneActivation_private.pem
The following RSA key is a working example of option 4 above.
*/
$private = '-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDB6D3uBkBTq3ANlIjWUBfjRMbYXMdr6oQeX1uWGWAVvzMO3yEy
mbBOB2P1fUol39VGtT+K8yv6Yf888V3+0vIxlShDXk+HXXNbf77fZ5Qzpwuzv9d0
KUSZwZKYI84xZ4uQ9H5fmgq40fSwF7GSInC0J7tzjppnw0xxzrdbqi4PpQIDAQAB
AoGATbVc3D71GJLj3Q1hqUF/0TyG076azMy3FdTxRz30G8L8G0GgdD7TQPIFRSRo
yrThK+0HAhBh133eY/X2zWCMXk9dBPvlSy8fuEH17gCb1BiQ3yc7ujKtVUt4k8hg
sutREh3zknDAwJx9i0lB6nlQUNug3a5Fvcpo6xmZCl0ZGgECQQDxJ68dReE+0Xj2
uxL005CJdzEUjeQMxFNftNyFWZcY1SQtBMCYB41kE6WPqmbtxNqNPtc0p5ZusOJc
bjv6ZNo1AkEAzdf9C/2mO4igUOOELWmlfXGoQNHuesfH0Skk9Qt0/r8u893ldRN0
IY6fAxqMfXmcgjgOSOqDMhODkb+IbbSNsQJBAIHwwSHD0o/XrRc9TASRrvLzP4X0
wqnCa65JNP3BfXIK/vgm9GO2xg/jqjUUO2vow16SOsGLf7pbI01stHLCPvUCQQCF
U74akyul6gP1ALjvdTt0ujaB7bgrHNXHG4BNnCMmkgzGdlaWc4hH6AoEx6Bx8WA3
VDmkbwmVWOBieg3TCRyxAkBKfDVXdUGBs+EpzQ4kdTyJtxRMOXLnXsQRDmtW8BTn
LlRnlBF5VKlYlTyiQRTsfkSUKmDZzHobxR0c/uDXy5ba
-----END RSA PRIVATE KEY-----';
$pkeyid = openssl_pkey_get_private($private);
$pkeyid2 = openssl_pkey_get_private($private);
openssl_sign($accountToken, $signature, $pkeyid);
openssl_free_key($pkeyid);
openssl_sign($accountToken2, $signature2, $pkeyid2);
openssl_free_key($pkeyid2);
# -------------------------------------------------------------------------------------------------
$accountTokenSignature= base64_encode($signature);
$accountTokenSignature2= base64_encode($signature2);
$accountTokenCertificateBase64 = 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURaekNDQWsrZ0F3SUJBZ0lCQWpBTkJna3Foa2lHOXcwQkFRVUZBREI1TVFzd0NRWURWUV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eGxJRWx1WXk0eER6QU5CZ05WCkJBc1RCbWxRYUc5dVpUQ0JuekFOQmdrcWhraUc5dzBCQVFFRkFBT0JqUUF3Z1lrQ2dZRUF2Nmt6V1BVRkE0REIKTzdGR1ZRbXR3blUvbVY5TTJrWkRkNmZWTmtFOUU4K0hMelp0cWNNeHRvL0FSaEVJWkhHTWdiSUcrR3llMzNQUwpTTlBPVDNOMWdMdmhRN1VMSkhlVUhQL1pvYlNPWk83OXYvMDlLd2RvV1pzWm13a3NpWnVmR01WYjYzMVIzMkw1ClFHTzZ5bkJTRXgya3JwWHpOVzJYRjAva0VlaGlGTjBDQXdFQUFhT0JsVENCa2pBZkJnTlZIU01FR0RBV2dCU3kKL2lFalJJYVZhbm5WZ1NhT2N4RFlwMHlPZERBZEJnTlZIUTRFRmdRVVc2d1BPNERLZ0NnU0FmZkRZQWJ3dzVITQpmK0F3REFZRFZSMFRBUUgvQkFJd0FEQU9CZ05WSFE4QkFmOEVCQU1DQmFBd0lBWURWUjBsQVFIL0JCWXdGQVlJCkt3WUJCUVVIQXdFR0NDc0dBUVVGQndNQ01CQUdDaXFHU0liM1kyUUdDZ0lFQWdVQU1BMEdDU3FHU0liM0RRRUIKQlFVQUE0R0JBR08vV25MK3lhbXhMYXZMWG53VVZWQVNNUE8xOGhma3Q2RzgxNWZucWErMXhhV2tZVnY2VHZQeApjVlZvVnZmcnIvZ2IrL2hjMGdFRm1iL2tlOTJVcEwvN1I4Vm9TL2NCSUhXVm44WFU3a2J1bTVaTlVxeVdMbU9lClZ4VW5kdHptaUFhaTg3VmFNMFFFMjA3ZWpUQVBDc1YwdVppaktwdmEvS0sxZmhlYUp5dTcKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=';
file_put_contents($productVersion.'-'.$serialNumber.'.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://static.ips.apple.com/ipa_itunes/stylesheets/shared/common-min.css" charset="utf-8" rel="stylesheet" /><link href="http://static.ips.apple.com/deviceservices/stylesheets/styles.css" charset="utf-8" rel="stylesheet" /><link href="http://static.ips.apple.com/ipa_itunes/stylesheets/pages/IPAJingleEndPointErrorPage-min.css" charset="utf-8" rel="stylesheet" /><link href="resources/auth_styles.css" charset="utf-8" rel="stylesheet" /><script id="protocol" type="text/x-apple-plist">
<plist version="1.0">
<dict>
<key>'.($deviceClass == "iPhone" ? 'iphone' : 'device').'-activation</key>
<dict>
<key>activation-record</key>
<dict>
<key>FairPlayKeyData</key>
<data>'.$fairPlayKeyData.'</data>
<key>AccountTokenCertificate</key>
<data>'.$accountTokenCertificateBase64.'</data>
<key>DeviceCertificate</key>
<data>'.$deviceCertificate.'</data>
<key>AccountTokenSignature</key>
<data>'.$accountTokenSignature2.'</data>
<key>AccountToken</key>
<data>'.$accountTokenBase642.'</data>
</dict>
<key>unbrick</key>
<true/>
<key>show-settings</key>
<true/>
</dict>
</dict>
</plist>
</script><script>var protocolElement = document.getElementById("protocol");var protocolContent = protocolElement.innerText;iTunes.addProtocol(protocolContent);</script></head>
</html>');
$response ='<!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://static.ips.apple.com/ipa_itunes/stylesheets/shared/common-min.css" charset="utf-8" rel="stylesheet" /><link href="http://static.ips.apple.com/deviceservices/stylesheets/styles.css" charset="utf-8" rel="stylesheet" /><link href="http://static.ips.apple.com/ipa_itunes/stylesheets/pages/IPAJingleEndPointErrorPage-min.css" charset="utf-8" rel="stylesheet" /><link href="resources/auth_styles.css" charset="utf-8" rel="stylesheet" /><script id="protocol" type="text/x-apple-plist">
<plist version="1.0">
<dict>
<key>'.($deviceClass == "iPhone" ? 'iphone' : 'device').'-activation</key>
<dict>
<key>activation-record</key>
<dict>
<key>FairPlayKeyData</key>
<data>'.$fairPlayKeyData.'</data>
<key>AccountTokenCertificate</key>
<data>'.$accountTokenCertificateBase64.'</data>
<key>DeviceCertificate</key>
<data>'.$deviceCertificate.'</data>
<key>AccountTokenSignature</key>
<data>'.$accountTokenSignature2.'</data>
<key>AccountToken</key>
<data>'.$accountTokenBase642.'</data>
</dict>
<key>unbrick</key>
<true/>
<key>show-settings</key>
<true/>
</dict>
</dict>
</plist>
</script><script>var protocolElement = document.getElementById("protocol");var protocolContent = protocolElement.innerText;iTunes.addProtocol(protocolContent);</script></head>
</html>';
echo $response;
exit;
?>