forked from iH8sn0w/iBooty
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.vb
More file actions
844 lines (839 loc) · 30 KB
/
Form1.vb
File metadata and controls
844 lines (839 loc) · 30 KB
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
Imports System.Management
Public Class Form1
Public cmdline As String
Public iDevice As String
Public DFUConnected As Boolean = False
Public RecoveryConnected As Boolean = False
Public ResetDFU As Boolean = False
Public killit As Boolean = False
Public iWant2Exit As Boolean = False
Public icountMatch As Integer
Private WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
Private WithEvents BackgroundWorker2 As System.ComponentModel.BackgroundWorker
Private WithEvents BackgroundWorker3 As System.ComponentModel.BackgroundWorker
Private WithEvents doit As System.ComponentModel.BackgroundWorker
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.SelectedItem = "Select your iDevice:"
If File_Exists(Application.StartupPath & "\files\llb.3gs.dfu") = True Then
ComboBox1.Items.Add("iPhone 3GS")
End If
If File_Exists(Application.StartupPath & "\files\llb.4.dfu") = True Then
ComboBox1.Items.Add("iPhone 4")
End If
If File_Exists(Application.StartupPath & "\files\llb.ipt2g.dfu") = True Then
ComboBox1.Items.Add("iPod Touch 2G")
End If
If File_Exists(Application.StartupPath & "\files\llb.ipt3.dfu") = True Then
ComboBox1.Items.Add("iPod Touch 3G")
End If
If File_Exists(Application.StartupPath & "\files\llb.ipt4.dfu") = True Then
ComboBox1.Items.Add("iPod Touch 4")
End If
If File_Exists(Application.StartupPath & "\files\llb.ipad.dfu") = True Then
ComboBox1.Items.Add("iPad")
End If
If File_Exists(Application.StartupPath & "\files\notice.read") = False Then
Init.Show()
Init.BringToFront()
Init.InitCount.Text = "10"
Delay(1)
Init.InitCount.Text = "9"
Delay(1)
Init.InitCount.Text = "8"
Delay(1)
Init.InitCount.Text = "7"
Delay(1)
Init.InitCount.Text = "6"
Delay(1)
Init.InitCount.Text = "5"
Delay(1)
Init.InitCount.Text = "4"
Delay(1)
Init.InitCount.Text = "3"
Delay(1)
Init.InitCount.Text = "2"
Delay(1)
Init.InitCount.Text = "1"
Delay(1)
Init.Hide()
Try
SaveToDisk("bla.nk", "files\notice.read")
Catch Ex As Exception
End Try
End If
Me.Hide()
Label2.Left = (Me.Width / 2) - (Label2.Width / 2)
Me.Show()
Me.BringToFront()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
Process.Start("http://ih8sn0w.com")
End Sub
Public Sub CleanupDFU()
dfuinstructions.Visible = False
Prepare.Visible = False
Button3.Visible = True
Button3.Text = "Cancel"
iWant2Exit = True
Label2.Visible = True
ProgressBar1.Style = ProgressBarStyle.Blocks
'Do what we gotta do =)
Status.Text = "Exploiting with limera1n..."
cmdline = Quote.Text & "files\s-irecovery.exe" & Quote.Text & " -e"
ExecCmd(cmdline, True)
ProgressBar1.Value = 50
'Search for the return of the device...
Status.Text = "Waiting for device..."
Delay(3.5)
BackgroundWorker3 = New System.ComponentModel.BackgroundWorker
BackgroundWorker3.RunWorkerAsync()
End Sub
Public Sub UploadiBSS()
Status.Text = "Uploading LLB..."
cmdline = Quote.Text & "files\s-irecovery.exe" & Quote.Text & " -f " & Quote.Text & "files\llb." & iDevice & ".dfu" & Quote.Text
ExecCmd(cmdline, True)
Status.Text = "Booting..."
Call UploadiBoot()
End Sub
Public Sub UploadiBoot()
ProgressBar1.Value = 100
iWant2Exit = False
Button3.Visible = False
Button3.Text = "Reset DFU Instructions"
Button3.Enabled = True
Delay(1)
Status.Text = "Done! :) [3]"
Delay(1)
Status.Text = "Done! :) [2]"
Delay(1)
Status.Text = "Done! :) [1]"
Delay(1)
Call GoGoGadgetCleanUp()
End Sub
Public Sub DFUIntructions()
ProgressBar1.Value = 0
ProgressBar1.Visible = True
ProgressBar1.Style = ProgressBarStyle.Marquee
Label2.Visible = False
dfuinstructions.Visible = False
Prepare.Visible = True
Prepare.Text = "Prepare to press Power + Home (5)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to press Power + Home (4)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to press Power + Home (3)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to press Power + Home (2)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to press Power + Home (1)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Visible = False
dfuinstructions.Visible = True
dfuinstructions.Text = "Press the Power + Home Button! (10)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Press the Power + Home Button! (9)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Press the Power + Home Button! (8)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Press the Power + Home Button! (7)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Press the Power + Home Button! (6)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Visible = True
Prepare.Text = "Prepare to release the Power but keep holding Home. (5)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
dfuinstructions.Text = "Press the Power + Home Button! (5)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to release the Power but keep holding Home. (4)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
dfuinstructions.Text = "Press the Power + Home Button! (4)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to release the Power but keep holding Home. (3)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
dfuinstructions.Text = "Press the Power + Home Button! (3)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Text = "Prepare to release the Power but keep holding Home. (2)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
dfuinstructions.Text = "Press the Power + Home Button! (2)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Press the Power + Home Button! (1)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Prepare.Text = "Prepare to release the Power but keep holding Home. (1)"
Prepare.Left = (Me.Width / 2) - (Prepare.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Prepare.Visible = False
dfuinstructions.Text = "Release the Power Button, but keep holding home! (30)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (29)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (28)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (27)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (26)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (25)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (24)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (23)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (22)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (21)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (20)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (19)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (18)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (17)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (16)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (15)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (14)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (13)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (12)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (11)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (10)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (9)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (8)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (7)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (6)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (5)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (4)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (3)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (2)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If DFUConnected = True Then
Call CleanupDFU()
Exit Sub
End If
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
dfuinstructions.Text = "Release the Power Button, but keep holding home! (1)"
dfuinstructions.Left = (Me.Width / 2) - (dfuinstructions.Width / 2)
Delay(1)
If ResetDFU = True Then
ResetDFU = False
Call DFUIntructions()
Exit Sub
End If
Call GoGoGadgetCleanUp()
dfuinstructions.Visible = False
MsgBox("You failed to Enter DFU. Please Try again.", MsgBoxStyle.Critical)
End Sub
Public Sub GoGoGadgetCleanUp()
ProgressBar1.Style = ProgressBarStyle.Blocks
ProgressBar1.Value = 0
Button1.Visible = True
Label2.Visible = True
Try
BackgroundWorker1.CancelAsync()
BackgroundWorker2.CancelAsync()
BackgroundWorker3.CancelAsync()
Catch ex As Exception
End Try
Button3.Visible = False
Button3.Enabled = True
Button3.Text = "Reset DFU Instructions"
ComboBox1.Enabled = True
End Sub
Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Process.Start("http://github.com/iH8sn0w/iBooty")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ComboBox1.Enabled = False
Status.Text = "Searching for DFU..."
Button1.Visible = False
Button3.Visible = True
ProgressBar1.Style = ProgressBarStyle.Marquee
BackgroundWorker1 = New System.ComponentModel.BackgroundWorker
BackgroundWorker1.RunWorkerAsync()
Call DFUIntructions()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If iWant2Exit = True Then
iWant2Exit = False
Button3.Enabled = False
Status.Text = "Cancelling..."
cmdline = "cmd /c taskkill /f /t /im files\s-irecovery.exe"
ExecCmd(cmdline, True)
killit = True
Call GoGoGadgetCleanUp()
Else
ResetDFU = True
End If
End Sub
Public Sub Search_DFU2(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker3.DoWork
DFUConnected = False
RecoveryConnected = False
Do Until DFUConnected = True
If killit = True Then
killit = False
Exit Sub
End If
'Searching for DFU...
console.Text = " "
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_PnPEntity WHERE Description = 'Apple Recovery (DFU) USB Driver'")
For Each queryObj As ManagementObject In searcher.Get()
console.Text += (queryObj("Description"))
Next
If console.Text.Contains("DFU") Then
If killit = True Then
killit = False
Exit Sub
End If
Call UploadiBSS()
End If
Loop
End Sub
Public Sub Search_DFU(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
DFUConnected = False
RecoveryConnected = False
Do Until DFUConnected = True
If killit = True Then
killit = False
Exit Sub
End If
'Searching for DFU...
console.Text = " "
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_PnPEntity WHERE Description = 'Apple Recovery (DFU) USB Driver'")
For Each queryObj As ManagementObject In searcher.Get()
console.Text += (queryObj("Description"))
Next
If console.Text.Contains("DFU") Then
If killit = True Then
killit = False
Exit Sub
End If
'MsgBox("In DFU!", MsgBoxStyle.Information)
DFUConnected = True
End If
Loop
End Sub
Public Sub Search_Recovery(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork
DFUConnected = False
RecoveryConnected = False
Do Until RecoveryConnected = True
If killit = True Then
killit = False
Exit Sub
End If
'Searching for Recovery...
console.Text = " "
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_PnPEntity WHERE Description = 'Apple Recovery (iBoot) USB Driver'")
For Each queryObj As ManagementObject In searcher.Get()
console.Text += (queryObj("Description"))
Next
If console.Text.Contains("iBoot") Then
'MsgBox("In Recovery!", MsgBoxStyle.Information)
RecoveryConnected = True
If killit = True Then
killit = False
Exit Sub
End If
Call UploadiBoot()
End If
Loop
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "Select your iDevice:" Then
Button1.Enabled = False
Button1.Text = "Select your iDevice!"
iDevice = ""
Me.Text = "iBooty 2.2 -- By: iH8sn0w"
line.Visible = True
ElseIf ComboBox1.SelectedItem = "iPhone 3GS" Then
Button1.Enabled = True
Button1.Text = "Start"
Me.Text = "iBooty 2.2 -- By: iH8sn0w" & " - [" & ComboBox1.SelectedItem & "]"
iDevice = "3gs"
line.Visible = False
ElseIf ComboBox1.SelectedItem = "iPhone 4" Then
Button1.Enabled = True
Button1.Text = "Start"
Me.Text = "iBooty 2.2 -- By: iH8sn0w" & " - [" & ComboBox1.SelectedItem & "]"
iDevice = "4"
line.Visible = False
ElseIf ComboBox1.SelectedItem = "iPod Touch 2G" Then
Button1.Enabled = True
Button1.Text = "Start"
Me.Text = "iBooty 2.2 -- By: iH8sn0w" & " - [" & ComboBox1.SelectedItem & "]"
iDevice = "ipt2g"
line.Visible = False
ElseIf ComboBox1.SelectedItem = "iPod Touch 3G" Then
Button1.Enabled = True
Button1.Text = "Start"
Me.Text = "iBooty 2.2 -- By: iH8sn0w" & " - [" & ComboBox1.SelectedItem & "]"
iDevice = "ipt3"
line.Visible = False
ElseIf ComboBox1.SelectedItem = "iPod Touch 4" Then
Button1.Enabled = True
Button1.Text = "Start"
Me.Text = "iBooty 2.2 -- By: iH8sn0w" & " - [" & ComboBox1.SelectedItem & "]"
iDevice = "ipt4"
line.Visible = False
ElseIf ComboBox1.SelectedItem = "iPad" Then
Button1.Enabled = True
Button1.Text = "Start"
Me.Text = "iBooty 2.2 -- By: iH8sn0w" & " - [" & ComboBox1.SelectedItem & "]"
iDevice = "ipad"
line.Visible = False
End If
End Sub
End Class