1
This commit is contained in:
13
set1/challenge4.py
Normal file
13
set1/challenge4.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import binascii
|
||||
|
||||
with open("set1/4.txt",'r') as file:
|
||||
lines = file.readlines()
|
||||
|
||||
hex_str = "".join(line.strip() for line in lines)
|
||||
bytes_str = binascii.unhexlify(hex_str)
|
||||
|
||||
for key in range(256):
|
||||
decrypted = "".join(chr(b ^ key) for b in bytes_str)
|
||||
print(decrypted)
|
||||
|
||||
# 不知道为什么全部都是乱码
|
||||
Reference in New Issue
Block a user