Created
May 26, 2016 08:55
-
-
Save CreateRemoteThread/093f5bea015cb7b4507bdb7f69d1076e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2016.05.26 03:39:02 AEST | |
#Embedded file name: byteme.py | |
import string | |
def encodeXor(pwd): | |
key = 'Insanity: doing the same thing over and over again and expecting different results.' * 2 | |
result = [] | |
i = 5 | |
for x in pwd: | |
result.append(ord(x) + i ^ ord(key[i]) % 255) | |
i = i + 1 % len(key) | |
return result | |
def encryptShift(pwd): | |
rot13 = string.maketrans('ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz', 'NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm') | |
result = string.translate(pwd, rot13) | |
return result | |
if __name__ == '__main__': | |
flag = [84, | |
3, | |
69, | |
4, | |
28, | |
94, | |
47, | |
41, | |
43, | |
39, | |
104, | |
48, | |
23, | |
38, | |
165, | |
62, | |
231, | |
232, | |
227, | |
107, | |
38, | |
224, | |
36, | |
226, | |
232, | |
115, | |
58, | |
37, | |
61, | |
39, | |
117, | |
53, | |
246, | |
60, | |
121, | |
246, | |
43, | |
249, | |
238, | |
69, | |
254, | |
248, | |
255, | |
0, | |
7, | |
133, | |
13, | |
202, | |
12, | |
133, | |
207, | |
16, | |
217, | |
205, | |
17, | |
216, | |
199, | |
27, | |
19, | |
84, | |
19, | |
29, | |
26, | |
213] | |
result = [] | |
print 'Welcome to the ByteMe challenge' | |
pwd = raw_input('Enter the access code: ') | |
result = encryptShift(pwd) | |
result = encodeXor(result) | |
if flag == result: | |
print 'You Win!' | |
else: | |
print 'Try Again!' | |
+++ okay decompyling byteme.pyc | |
# decompiled 1 files: 1 okay, 0 failed, 0 verify failed | |
# 2016.05.26 03:39:02 AEST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment