Last active
February 19, 2016 14:10
-
-
Save 0xPwny/0814dccb2d250f1cc293 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
#/usr/bin/python | |
#Abdeljalil Nouiri | |
#Crypthon ^^ | |
import time | |
import binascii | |
#========================================================== | |
#S1C1 | |
#========================================================= | |
hexa = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d" | |
output = hexa.decode("hex") | |
dec = output.encode('base64') | |
time.sleep(5) | |
print 'Cipher => ', hexa | |
time.sleep(5) | |
print 'Hex Decode => ', output | |
time.sleep(5) | |
print 'Output Encode => ', dec | |
time.sleep(5) | |
print "Did The Output encode = Cipher ? " | |
time.sleep(5) | |
if "SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t" in dec: | |
print "Yees !" | |
else: | |
print "Nooo !" | |
#========================================================== | |
time.sleep(5) | |
print """ | |
--------------------------------------- | |
S1C2 | |
--------------------------------------- | |
""" | |
#========================================================== | |
c1 = ("1c0111001f010100061a024b53535009181c".decode('hex')).replace('\n','') | |
c2 = ('686974207468652062756c6c277320657965'.decode("hex")).replace('\n','') | |
zipper = zip(c1,c2) | |
xr = "" | |
for h,x in zipper: | |
xr += chr(ord(h) ^ ord(x)) | |
print xr | |
#=========================================================== | |
time.sleep(5) | |
print """ | |
--------------------------------------- | |
S1C3 | |
--------------------------------------- | |
""" | |
#=========================================================== | |
col = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736" | |
def cracker(crack1,crack2): | |
hap1 = crack1.decode('hex') | |
hap2 = crack2.decode("hex") | |
zipper = zip(hap1,hap2) | |
lol = "" | |
for h,x in zipper: | |
lol += chr(ord(h) ^ ord(x)) | |
return lol | |
for iii in xrange(78,79): | |
dodo = chr(iii) | |
dododo = str(iii)*len(col) | |
print dodo," =>> ", cracker(col,dododo) | |
#=========================================================== | |
time.sleep(5) | |
print """ | |
--------------------------------------- | |
S1C7 | |
--------------------------------------- | |
""" | |
#=========================================================== | |
from Crypto.Cipher import AES | |
f = open("7.txt").read() | |
x = f.decode('base64') | |
key = "YELLOW SUBMARINE" | |
def flag(dec,key): | |
cip = AES.new(key,AES.MODE_ECB) | |
deco = cip.decrypt(dec) | |
print deco | |
print flag(x,key) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment