wp-pwncollege-data-dealings~nested-encoding
Dealing with Data
data-dealings~nested-encoding
have a look source code
1 | hacker@data-dealings~nested-encoding:~$ cat /challenge/runme |
solution code 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19import pwn
# encode
correct_password =pwn.enhex(b'qbtsxoxg')
for i in range(3):
correct_password =correct_password.encode("l1")
correct_password =pwn.enhex(correct_password)
# write to file
with open('/home/hacker/pwn_script/sec', 'w') as f:
f.write(correct_password)
# read from file, filename is the --arg1
# p = process(['./target', '--arg1']
p = pwn.process(["/challenge/runme", '/home/hacker/pwn_script/sec'])
# get flag
print(p.readall().decode())