Skip to content

Simple python script for cracking of XOR-encrypted data

Notifications You must be signed in to change notification settings

L0C4RD/XOR-cracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

XOR solver

Dead easy.

from xor import xor_solver

# Initialise the solver with the set of characters used to write the plaintext.
x = xor_solver(string.printable)

# Run to spit out a list of (key, plaintext) pairs.
solutions = x.solve(

	"fd3cebb2e009e5a0f537c6bcef38ef85ee24f8bcff14e5b9eb38e3bbe6", #Your ciphertext
	4,                                                            #Your key length
	is_hex=True                                                   #Flag to interpret hex digits as hex.

)

#Show key-value pairs
print solutions

assert("flag{YoungLithePutridDolphin}" in [s[1] for s in solutions])

About

Simple python script for cracking of XOR-encrypted data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages