Add level5
And reword some parts
This commit is contained in:
parent
4907f833e2
commit
60aecd0591
2 changed files with 222 additions and 74 deletions
13
content/secu_logicielle/td9-hackme/files/level5.py
Executable file
13
content/secu_logicielle/td9-hackme/files/level5.py
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/env python3
|
||||
import sys
|
||||
|
||||
password = sys.argv[1]
|
||||
if len(password) < 3:
|
||||
print('Minimal password size: 3, get {}'.format(len(password)))
|
||||
sys.exit(1)
|
||||
xor=0
|
||||
target=0x43
|
||||
for letter in password:
|
||||
xor=xor^ord(letter)
|
||||
last_letter=xor^target
|
||||
print("here is your password: {}{}".format(password,chr(last_letter)))
|
Loading…
Add table
Add a link
Reference in a new issue