Skip to content

Instantly share code, notes, and snippets.

@bored-engineer
Created May 18, 2013 19:09
Show Gist options
  • Select an option

  • Save bored-engineer/5605463 to your computer and use it in GitHub Desktop.

Select an option

Save bored-engineer/5605463 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import sys
# A string of charecters to test
data = "0123456789abcdefghijklmnopqrstuvwxyz"
# The correct result
verify_arr = [193, 35, 9, 33, 1, 9, 3, 33, 9, 225]
# Loop each correct result
for verify in verify_arr:
# Loop each possible charecter that may match
for char in data:
#Check it
if ((((ord(char) << 5) | (ord(char) >> 3)) ^ 111) & 255 == verify):
#Print it if true
sys.stdout.write(char)
#Newline
print '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment