-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathchall.py
181 lines (143 loc) · 5.95 KB
/
chall.py
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
# 404CTF{H!Dd&N-v4r$_f0r_5p3ciaLiz3d_0pCoD3S!|12T5Y22EML8}
h = __import__('dis')
a = input('Mot de passe : ')
a = [ord(c) for c in a]
def check(passwd, tmp):
secret = h.Bytecode(check, **kwargs).dis().count('I')
checked = 0
if passwd[0] + passwd[1] + secret * passwd[2] == 35329:
checked += 1
if passwd[0] + secret * passwd[1] + passwd[2] == 17234:
checked += 1
if passwd[0] + passwd[1] + secret * passwd[2] == 87961:
checked += 1
if passwd[0] + secret * passwd[1] + passwd[2] == 42776:
checked += 1
if passwd[3] + passwd[4] + secret * passwd[5] == 40542:
checked += 1
if passwd[3] + secret * passwd[4] + passwd[5] == 19862:
checked += 1
if passwd[3] + passwd[4] + secret * passwd[5] == 100914:
checked += 1
if passwd[3] + secret * passwd[4] + passwd[5] == 49274:
checked += 1
if passwd[6] + passwd[7] + secret * passwd[8] == 27099:
checked += 1
if passwd[6] + secret * passwd[7] + passwd[8] == 61221:
checked += 1
if passwd[6] + passwd[7] + secret * passwd[8] == 67347:
checked += 1
if passwd[6] + secret * passwd[7] + passwd[8] == 152553:
checked += 1
if passwd[9] + passwd[10] + secret * passwd[11] == 49360:
checked += 1
if passwd[9] + secret * passwd[10] + passwd[11] == 18857:
checked += 1
if passwd[9] + passwd[10] + secret * passwd[11] == 122890:
checked += 1
if passwd[9] + secret * passwd[10] + passwd[11] == 46721:
checked += 1
if passwd[12] + passwd[13] + secret * passwd[14] == 59202:
checked += 1
if passwd[12] + secret * passwd[13] + passwd[14] == 25080:
checked += 1
if passwd[12] + passwd[13] + secret * passwd[14] == 147438:
checked += 1
if passwd[12] + secret * passwd[13] + passwd[14] == 62232:
checked += 1
if passwd[15] + passwd[16] + secret * passwd[17] == 58164:
checked += 1
if passwd[15] + secret * passwd[16] + passwd[17] == 27661:
checked += 1
if passwd[15] + passwd[16] + secret * passwd[17] == 144852:
checked += 1
if passwd[15] + secret * passwd[16] + passwd[17] == 68683:
checked += 1
if passwd[18] + passwd[19] + secret * passwd[20] == 54540:
checked += 1
if passwd[18] + secret * passwd[19] + passwd[20] == 51438:
checked += 1
if passwd[18] + passwd[19] + secret * passwd[20] == 135810:
checked += 1
if passwd[18] + secret * passwd[19] + passwd[20] == 128064:
checked += 1
if passwd[21] + passwd[22] + secret * passwd[23] == 54563:
checked += 1
if passwd[21] + secret * passwd[22] + passwd[23] == 39570:
checked += 1
if passwd[21] + passwd[22] + secret * passwd[23] == 135833:
checked += 1
if passwd[21] + secret * passwd[22] + passwd[23] == 98394:
checked += 1
if passwd[24] + passwd[25] + secret * passwd[26] == 51973:
checked += 1
if passwd[24] + secret * passwd[25] + passwd[26] == 26640:
checked += 1
if passwd[24] + passwd[25] + secret * passwd[26] == 129373:
checked += 1
if passwd[24] + secret * passwd[25] + passwd[26] == 66114:
checked += 1
if passwd[27] + passwd[28] + secret * passwd[29] == 58159:
checked += 1
if passwd[27] + secret * passwd[28] + passwd[29] == 25071:
checked += 1
if passwd[27] + passwd[28] + secret * passwd[29] == 144847:
checked += 1
if passwd[27] + secret * passwd[28] + passwd[29] == 62223:
checked += 1
if passwd[30] + passwd[31] + secret * passwd[32] == 35402:
checked += 1
if passwd[30] + secret * passwd[31] + passwd[32] == 57633:
checked += 1
if passwd[30] + passwd[31] + secret * passwd[32] == 88034:
checked += 1
if passwd[30] + secret * passwd[31] + passwd[32] == 143547:
checked += 1
if passwd[33] + passwd[34] + secret * passwd[35] == 17228:
checked += 1
if passwd[33] + secret * passwd[34] + passwd[35] == 43078:
checked += 1
if passwd[33] + passwd[34] + secret * passwd[35] == 42770:
checked += 1
if passwd[33] + secret * passwd[34] + passwd[35] == 107320:
checked += 1
if passwd[36] + passwd[37] + secret * passwd[38] == 26073:
checked += 1
if passwd[36] + secret * passwd[37] + passwd[38] == 25556:
checked += 1
if passwd[36] + passwd[37] + secret * passwd[38] == 64773:
checked += 1
if passwd[36] + secret * passwd[37] + passwd[38] == 63482:
checked += 1
if passwd[39] + passwd[40] + secret * passwd[41] == 46239:
checked += 1
if passwd[39] + secret * passwd[40] + passwd[41] == 27627:
checked += 1
if passwd[39] + passwd[40] + secret * passwd[41] == 115125:
checked += 1
if passwd[39] + secret * passwd[40] + passwd[41] == 68649:
checked += 1
if passwd[42] + passwd[43] + secret * passwd[44] == 35842:
checked += 1
if passwd[42] + secret * passwd[43] + passwd[44] == 26019:
checked += 1
if passwd[42] + passwd[43] + secret * passwd[44] == 89248:
checked += 1
if passwd[42] + secret * passwd[43] + passwd[44] == 64719:
checked += 1
if passwd[45] + passwd[46] + secret * passwd[47] == 29161:
checked += 1
if passwd[45] + secret * passwd[46] + passwd[47] == 39501:
checked += 1
if passwd[45] + passwd[46] + secret * passwd[47] == 72505:
checked += 1
if passwd[45] + secret * passwd[46] + passwd[47] == 98325:
checked += 1
tmp+tmp
return checked == 32
kwargs = {'adaptive': True}
for i in range(10):
if not (check(a, 1) or check(a, 1)):
print('Non, c\'est pas ça...')
exit(0)
print('Bravo ! Le flag est 404CTF{mot_de_passe} ! ')