PK‚INœ¦4‰‰4remmina_password_exposer/remmina_password_exposer.py#!/usr/bin/python # 2018 Giuseppe De Marco import base64 import os import re import sys try: from Crypto.Cipher import DES3 except Exception as e: print(e) print('pip3 install --upgrade pycrypto') sys.exit(1) # ENV HOME = os.path.expanduser("~") CHARSET = 'utf-8' REMMINA_FOLDER = os.getenv('REMMINA_FOLDER', HOME+'/'+'.remmina/') REMMINA_PREF = 'remmina.pref' REGEXP_ACCOUNTS = r'[0-9]{13}\.remmina(.swp)?' REGEXP_PREF = r'remmina.pref' def show_remmina_accounts(debug=False): diz = {} res = [] fs = open(REMMINA_FOLDER+REMMINA_PREF) fso = fs.readlines() fs.close() for i in fso: if re.findall(r'secret=', i): r_secret = i[len(r'secret='):][:-1] if debug: print('**secret found {}'.format(r_secret)) for f in os.listdir(REMMINA_FOLDER): if re.findall(REGEXP_ACCOUNTS, f): fo = open( REMMINA_FOLDER+f, 'r') for i in fo.readlines(): if re.findall(r'^password=', i): r_password = i[len(r'password='):][:-1] if re.findall(r'^name=', i): r_name = i.split('=')[1][:-1] if re.findall(r'username=', i): r_username = i.split('=')[1][:-1] if debug: print(fo, 'found', f) password = base64.b64decode(r_password) secret = base64.b64decode(r_secret) diz[r_name] = DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password) if sys.version_info.major == 3: pval = diz[r_name].decode(CHARSET) else: pval = diz[r_name] r = (r_name, r_username, pval, diz[r_name]) res.append(r) print('{} {} {} [raw:{}]'.format(*r)) fo.close() return res if __name__ == '__main__': show_remmina_accounts() PK‚IN$remmina_password_exposer/__init__.pyPK•‚IN˜àþð€€Eremmina_password_exposer-0.3.data/scripts/remmina_password_exposer.py#!python # 2018 Giuseppe De Marco import base64 import os import re import sys try: from Crypto.Cipher import DES3 except Exception as e: print(e) print('pip3 install --upgrade pycrypto') sys.exit(1) # ENV HOME = os.path.expanduser("~") CHARSET = 'utf-8' REMMINA_FOLDER = os.getenv('REMMINA_FOLDER', HOME+'/'+'.remmina/') REMMINA_PREF = 'remmina.pref' REGEXP_ACCOUNTS = r'[0-9]{13}\.remmina(.swp)?' REGEXP_PREF = r'remmina.pref' def show_remmina_accounts(debug=False): diz = {} res = [] fs = open(REMMINA_FOLDER+REMMINA_PREF) fso = fs.readlines() fs.close() for i in fso: if re.findall(r'secret=', i): r_secret = i[len(r'secret='):][:-1] if debug: print('**secret found {}'.format(r_secret)) for f in os.listdir(REMMINA_FOLDER): if re.findall(REGEXP_ACCOUNTS, f): fo = open( REMMINA_FOLDER+f, 'r') for i in fo.readlines(): if re.findall(r'^password=', i): r_password = i[len(r'password='):][:-1] if re.findall(r'^name=', i): r_name = i.split('=')[1][:-1] if re.findall(r'username=', i): r_username = i.split('=')[1][:-1] if debug: print(fo, 'found', f) password = base64.b64decode(r_password) secret = base64.b64decode(r_secret) diz[r_name] = DES3.new(secret[:24], DES3.MODE_CBC, secret[24:]).decrypt(password) if sys.version_info.major == 3: pval = diz[r_name].decode(CHARSET) else: pval = diz[r_name] r = (r_name, r_username, pval, diz[r_name]) res.append(r) print('{} {} {} [raw:{}]'.format(*r)) fo.close() return res if __name__ == '__main__': show_remmina_accounts() PK–‚INTZâ­6remmina_password_exposer-0.3.dist-info/DESCRIPTION.rstRemmina password exposer ======================== Utility used to decrypt remmina password accounts `remmina_password_exposer.py` ..runs the game :) If you have .remmina folder backed up somewhere `REMMINA_FOLDER=/home/old-home/.remmina/ remmina_password_exposer.py` PK–‚INœ½x྾4remmina_password_exposer-0.3.dist-info/metadata.json{"classifiers": ["Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3"], "extensions": {"python.details": {"contacts": [{"email": "giuseppe.demarco@unical.it", "name": "Giuseppe De Marco", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/peppelinux/Remmina-password-exposer"}}}, "extras": [], "generator": "bdist_wheel (0.24.0)", "license": "BSD", "metadata_version": "2.0", "name": "remmina-password-exposer", "run_requires": [{"requires": ["pycrypto"]}], "summary": "Print remmina password in clear", "version": "0.3"}PK•‚INå(¦4remmina_password_exposer-0.3.dist-info/top_level.txtremmina_password_exposer PK–‚IN[÷C\\,remmina_password_exposer-0.3.dist-info/WHEELWheel-Version: 1.0 Generator: bdist_wheel (0.24.0) Root-Is-Purelib: true Tag: py3-none-any PK–‚IN†Ç³/remmina_password_exposer-0.3.dist-info/METADATAMetadata-Version: 2.0 Name: remmina-password-exposer Version: 0.3 Summary: Print remmina password in clear Home-page: https://github.com/peppelinux/Remmina-password-exposer Author: Giuseppe De Marco Author-email: giuseppe.demarco@unical.it License: BSD Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Requires-Dist: pycrypto Remmina password exposer ======================== Utility used to decrypt remmina password accounts `remmina_password_exposer.py` ..runs the game :) If you have .remmina folder backed up somewhere `REMMINA_FOLDER=/home/old-home/.remmina/ remmina_password_exposer.py` PK–‚INÔ5(…-remmina_password_exposer-0.3.dist-info/RECORDremmina_password_exposer/remmina_password_exposer.py,sha256=hraEaGP17cU-lVy4widzly_xNDJk_68-iTBvfikLFzc,1929 remmina_password_exposer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 remmina_password_exposer-0.3.dist-info/RECORD,, remmina_password_exposer-0.3.dist-info/DESCRIPTION.rst,sha256=JpWMoO5OpuGZYLg2MldhzbH6rD4Q2-V5xZUzG8I0Hd8,274 remmina_password_exposer-0.3.dist-info/METADATA,sha256=wKT0ksMMYMNCcKQjMWGF7Ior6q7DfK0PYtNoN8G1tG0,773 remmina_password_exposer-0.3.dist-info/top_level.txt,sha256=XElEZI3VBV2T8ZowpE-1MX2P3wYkvJptgOGHKh7i5wo,25 remmina_password_exposer-0.3.dist-info/metadata.json,sha256=f3VKv7VS0Sq_6dn6oRfaJ9mDxKYYY_bL497DtV-FIU8,702 remmina_password_exposer-0.3.dist-info/WHEEL,sha256=-aSo8rHuuPDEFzkcqqQ55pDyCjy25bYMLxSiHWKAOTc,92 remmina_password_exposer-0.3.data/scripts/remmina_password_exposer.py,sha256=z32S2VmLxFtNLww0Z-_RGazB0leMoS9XbtUlB3L7cj8,1920 PK‚INœ¦4‰‰4remmina_password_exposer/remmina_password_exposer.pyPK‚IN$Ûremmina_password_exposer/__init__.pyPK•‚IN˜àþð€€Eremmina_password_exposer-0.3.data/scripts/remmina_password_exposer.pyPK–‚INTZâ­6remmina_password_exposer-0.3.dist-info/DESCRIPTION.rstPK–‚INœ½x྾4fremmina_password_exposer-0.3.dist-info/metadata.jsonPK•‚INå(¦4vremmina_password_exposer-0.3.dist-info/top_level.txtPK–‚IN[÷C\\,áremmina_password_exposer-0.3.dist-info/WHEELPK–‚IN†Ç³/‡remmina_password_exposer-0.3.dist-info/METADATAPK–‚INÔ5(…-Ùremmina_password_exposer-0.3.dist-info/RECORDPK a±