-
Notifications
You must be signed in to change notification settings - Fork 75
/
doulCi.iDeviceCheck.php
executable file
·231 lines (219 loc) · 10.2 KB
/
doulCi.iDeviceCheck.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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php
// Checking Activation State & Grab the Tickets.
if ( $DeviceClass == "iPhone" )
{
global $SIM_OK;
$Message .= "DeviceClass = " .$DeviceClass . "\n";
// We have an iPhone and let's start
if ( $SIM_OK === true )
{
// This iPhone is Ready for Activation?
if ( $ActivationState == "Unactivated" )
{
// Do We Have Already saved Tickets?
if ( Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data" ) )
{
// Get the iPhone UnBricked.
// $Unbrick_Dec64 = file_get_contents ( $Request_Path . DS .
// $ProductType . "_" . $BuildVersion . "_" .
// "ActivationTicket.data" );
// $Unbrick = base64_decode ( $Unbrick_Dec64 );
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b>1 We have a Saved Activation Tickets Backup for your " . $DeviceClass . " from doulCi Server!</b>" . "<br>";
}
elseif ( Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data" ) )
{
// Get the iDevice UnBricked.
// $Unbrick_Dec64 = file_get_contents ( $Request_Path . DS .
// $ProductType . "_" . $BuildVersion . "_" .
// "SoftActivationTicket.data" );
// $Unbrick = base64_decode ( $Unbrick_Dec64 );
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b>2 We have a Saved SoftActivation Tickets Backup for your " . $DeviceClass . " from doulCi Server!</b>" . "<br>";
}
else
{
// Send Original iTunes Request to the Remote Server
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b>3 Attempting to Get Activation Ticket for " . $DeviceClass . " from Apple Server!</b>" . "<br>";
}
}
elseif ( $ActivationState == "Activated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'Activated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "SoftActivated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'SoftActivated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "SoftActivation" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'SoftActivation'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "FactoryActivated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'FactoryActivated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "WildcardActivated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'WildcardActivated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
else
{
// "WTF Is Going On??"
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b>0 doulCi Unknown Error Accrued for " . $DeviceClass . " ! Move to WTF Mode and Get Default Apple Response.</b>" . "<br>";
// Show Merruk's Activation Error.
// print Merruks_Error ( $SerialNumber ) ;
}
}
else
{
// Send Original iTunes Request to the Remote Server
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b> This " . $DeviceClass . " Cannot be activated by doulCi Server! Check your SIM Card Status.</b>" . "<br>";
}
}
else
{
$Message .= "DeviceClass = " .$DeviceClass . "\n";
// This iDevice is Ready for Activation?
if ( $ActivationState == "Unactivated" )
{
// Do We Have Already saved Tickets?
if ( Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data" ) )
{
// Get the iDevice UnBricked.
// $Unbrick_Dec64 = file_get_contents ( $Request_Path . DS .
// $ProductType . "_" . $BuildVersion . "_" .
// "ActivationTicket.data" );
// $Unbrick = base64_decode ( $Unbrick_Dec64 );
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b> We have a Saved Activation Tickets Backup for your " . $DeviceClass . " from doulCi Server!</b>" . "<br>";
}
elseif ( Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data" ) )
{
// Get the iDevice UnBricked.
// $Unbrick_Dec64 = file_get_contents ( $Request_Path . DS .
// $ProductType . "_" . $BuildVersion . "_" .
// "SoftActivationTicket.data" );
// $Unbrick = base64_decode ( $Unbrick_Dec64 );
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b> We have a Saved SoftActivation Tickets Backup for your " . $DeviceClass . " from doulCi Server!</b>" . "<br>";
}
else
{
// Send the Original iTunes Request to the Remote Server
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b> Attempting to Get Activation Ticket for " . $DeviceClass . " from Apple Server!</b>" . "<br>";
}
}
elseif ( $ActivationState == "Activated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'Activated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "SoftActivated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'SoftActivated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "SoftActivation" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'SoftActivation'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "FactoryActivated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'FactoryActivated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
elseif ( $ActivationState == "WildcardActivated" )
{
$Unbrick = Setting_iTunes ( );
$Message .= "<br><b> Your " . $DeviceClass . " state is 'WildcardActivated'.! it must be 'Unactivated' to gain help of 'doulCi Server'.</b>" . "<br>";
}
else
{
// "WTF Is Going On??"
$Unbrick = cURLgetData ( APPLE_ALBERT_ACTIVATION, USER_AGENT_ACTIVATION );
$Message .= "<br><b> doulCi Unknown Error Accrued for " . $DeviceClass . " ! Move to WTF Mode and Get Default Apple Response.</b>" . "<br>";
// Show Merruk's Activation Error.
// print Merruks_Error ( $SerialNumber ) ;
}
}
// Activation Processes is Done! Now Save the Files.
if ( strpos ( $Unbrick, 'ack-received' ) !== false )
{
$Unbrick_Enc64 = true;
$Message .= "Get iTunes Settings." . "\n";
}
elseif ( strpos ( $Unbrick, 'activation-record' ) !== false )
{
$Unbrick_Enc64 = file_put_contents ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data", base64_encode ( $Unbrick ) );
$Message .= "We have Actiation Tickets." . "\n";
}
elseif ( strpos ( $Unbrick, 'activation-info-base64' ) !== false )
{
$Unbrick_Enc64 = file_put_contents ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "iCloud_Locked.data", base64_encode ( $Unbrick ) );
$Message .= "iCloud Locked Device." . "\n";
$_POST [ 'guid' ] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
//$Unbrick = cURLgetData ( DOULCI_ALBERT_CERTIFYME, USER_AGENT_IOS_DEVICE );
//$Unbrick_Enc64 = file_put_contents ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data", base64_encode ( $Unbrick ) );
/*
$login_change = "name=\"login\" value=\"\"";
$dlogin_change = "name=\"login\" value=\"[email protected]\"";
$password_change = "name=\"password\"";
$dpassword_change = "name=\"password\" value=\"s78963210S\"";
$button_change = "<button id=\"btn-continue\" class=\"btn-continue\" type=\"submit\" onclick=\"submitActivate();\">Continue</button>";
$input_change = "<input id=\"btn-continue\" class=\"btn-continue\" type=\"submit\" value=\"Continue\">";
$Unbrick = str_replace ( APPLE_ALBERT_ACTIVATION, DOULCI_ALBERT_ACTIVATION, $Unbrick );
$Unbrick = str_replace ( $button_change, $input_change, $Unbrick );
$Unbrick = str_replace ( $login_change, $dlogin_change, $Unbrick );
$Unbrick = str_replace ( $password_change, $dpassword_change, $Unbrick );
$Message .= "Show Tweaked Page." . "\n";
*/
}
elseif ( strpos ( $Unbrick, 'Service Answer Center' ) !== false )
{
$Unbrick_Enc64 = file_put_contents ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SAM_Patched.data", base64_encode ( $Unbrick ) );
$_POST [ 'guid' ] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
$Unbrick = cURLgetData ( DOULCI_ALBERT_CERTIFYME, USER_AGENT_ACTIVATION );
$Unbrick_Enc64 = file_put_contents ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data", base64_encode ( $Unbrick ) );
$Message .= "Service Answer Center." . "\n";
}
else
{
$Unbrick_Enc64 = file_put_contents ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "Unknown_Activation_Status.data", base64_encode ( $Unbrick ) );
$Message .= "doulCi Unknown Error." . "\n";
}
if ( ! $Unbrick_Enc64 && $Unbrick = Setting_iTunes ( ) )
{
if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data" ) )
{
@unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data" );
}
if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data" ) )
{
@unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data" );
}
if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "iCloud_Locked.data" ) )
{
@unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "iCloud_Locked.data" );
}
if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "Unknown_Activation_Status.data" ) )
{
@unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "Unknown_Activation_Status.data" );
}
}
print $Unbrick;
if ( $doulCi_Debug == true )
{
die ( $Message );
}
?>