| 12
 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
 
 | import pyDes
 def adjust_length(str):
 if len(str) < 8:
 str = str.ljust(8, '0')
 elif len(str) > 8:
 str = str[:8]
 return str
 
 
 def yuanshen(array, start, end):
 Unsupported opcode: JUMP_BACKWARD
 num = len(array)
 dis = [
 float('inf')] * num
 tree = [
 False] * num
 parent = [
 -1] * num
 dis[start] = 0
 
 
 
 def qidong(input, key, IV):
 cipher = pyDes.des(key, pyDes.CBC, IV, pad = None, padmode = pyDes.PAD_PKCS5)
 encrypted_data = cipher.encrypt(input)
 encrypted_hex_list = encrypted_data()
 return encrypted_hex_list
 
 
 def main():
 data = [
 159,
 41,
 201,
 125,
 67,
 60,
 44,
 34,
 203,
 56,
 116,
 186,
 13,
 71,
 125,
 30,
 84,
 123,
 109,
 54,
 106,
 56,
 17,
 124,
 87,
 236,
 25,
 12,
 80,
 178,
 165,
 123]
 key = input('璇疯緭鍏ey: ')
 if len(key) != 8:
 print('wrong key lenth!')
 exit()
 flag = input('璇疯緭鍏lag: ')
 array = [
 [
 0,
 float('inf'),
 float('inf'),
 1,
 3,
 4,
 float('inf'),
 float('inf'),
 float('inf')],
 [
 float('inf'),
 0,
 float('inf'),
 float('inf'),
 float('inf'),
 2,
 float('inf'),
 4,
 float('inf')],
 [
 float('inf'),
 float('inf'),
 0,
 8,
 1,
 float('inf'),
 float('inf'),
 float('inf'),
 1],
 [
 1,
 float('inf'),
 8,
 0,
 3,
 5,
 1,
 2,
 float('inf')],
 [
 3,
 float('inf'),
 1,
 3,
 0,
 float('inf'),
 1,
 5,
 3],
 [
 4,
 2,
 float('inf'),
 5,
 float('inf'),
 0,
 float('inf'),
 1,
 float('inf')],
 [
 float('inf'),
 float('inf'),
 float('inf'),
 1,
 1,
 float('inf'),
 0,
 float('inf'),
 5],
 [
 float('inf'),
 4,
 float('inf'),
 2,
 5,
 1,
 5,
 0,
 float('inf')],
 [
 float('inf'),
 float('inf'),
 1,
 float('inf'),
 3,
 float('inf'),
 float('inf'),
 float('inf'),
 0]]
 t = yuanshen(array, 1, 8)
 IV = (lambda .0: Unsupported opcode: RETURN_GENERATOR
 pass
 )(t())
 IV = adjust_length(IV)
 check = qidong(flag, key, IV)
 if check == data:
 print('yes,yes,yes!!')
 return None
 ''.join('bad,bad,bad!!')
 
 main()
 
 |