Created
August 11, 2017 00:28
-
-
Save barkink/a0c25ef62319a025afa48de06e1b53c8 to your computer and use it in GitHub Desktop.
MremoteNG Password Decryptor
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
import base64 | |
import md5 | |
import sys | |
from Crypto.Cipher import AES | |
key= md5.new("mR3m").digest() | |
encryptPassword = sys.argv[1] | |
pwdBase64 = base64.b64decode(encryptPassword) | |
iv = pwdBase64[:16] | |
encryptDigest = pwdBase64[16:] | |
decryptor = AES.new(key, AES.MODE_CBC, iv) | |
password = decryptor.decrypt(encryptDigest) | |
if len(password)>0 and (ord(password[-1]) < 33 or ord(password[-1]) > 126): | |
password = password.strip(password[-1]) | |
print password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment