Last active
October 9, 2017 13:41
-
-
Save dixyes/0262970f3c9ce0390e05a07e5e73acd0 to your computer and use it in GitHub Desktop.
i dont know what this is
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/env python | |
# WTFPL | |
import base64 as b64 | |
import sys,zipfile,os.path | |
from Crypto.Cipher import AES | |
if __name__ == "__main__": | |
basename = os.path.basename(sys.argv[1]) | |
sstr = basename.split(".")[0] | |
secret = b64.b32decode(sstr+ "=" * ((8 - len(sstr) % 8) % 8)) | |
#print(secret[5:-5]) | |
obj = AES.new(b'\x8b\xa7\x36\x0a\xd5\x61\xb5\x9a\x58\x90\x58\x90\x2c\xc6\x44\x62', AES.MODE_CBC, b'\x0a\x01\x0b\x05\x04\x0f\x07\x09\x17\x03\x01\x06\x08\x0c\x0d\x5b') | |
plain = obj.decrypt(b64.b64decode(secret[5:-5])) | |
zipf = zipfile.PyZipFile(sys.argv[1],"r") | |
fn = zipf.infolist()[0].filename.split(".")[0].encode() | |
password = plain.split(fn)[1].split(b"\r")[0] | |
if len(sys.argv)>2: | |
tar = sys.argv[2] | |
else: | |
tar = "." | |
zipf.extract(zipf.infolist()[0],tar,password) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment