@sfb/

single byte xor cipher

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.2051948523186673","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"ZW5jb2RlZCA9ICcxYjM3MzczMzMxMzYzZjc4MTUxYjdmMmI3ODM0MzEzMzNkNzgzOTc4MjgzNzJkMzYzYzc4MzczZTc4M2EzOTNiMzczNicKaW1wb3J0IGJpbmFzY2lpCm51bXMgPSBiaW5hc2NpaS51bmhleGxpZnkoZW5jb2RlZCkKc3RyaW5ncyA9ICgnJy5qb2luKGNocihudW0gXiBrZXkpIGZvciBudW0gaW4gbnVtcykgZm9yIGtleSBpbiByYW5nZSgyNTYpKQpwcmludChtYXgoc3RyaW5ncywga2V5PWxhbWJkYSBzOiBzLmNvdW50KCcgJykpKQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
encoded = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736'
import binascii
nums = binascii.unhexlify(encoded)
strings = (''.join(chr(num ^ key) for num in nums) for key in range(256))
print(max(strings, key=lambda s: s.count(' ')))