Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import binascii
- DICT = "qwertyuiopasdfghjklzxcvbnm"
- def decrypt_xor(encoded):
- nums = binascii.unhexlify(encoded.strip())
- for j in range(0, 256):
- key = max(nums, key=nums.count) ^ j
- res = ''.join(chr(num ^ key) for num in nums)
- if len(list(filter(lambda x: x.lower() in DICT, res))) > 25:
- print(res)
- for i in encoded:
- decrypt_xor(i)
Add Comment
Please, Sign In to add comment