Skip to content

Commit

Permalink
python: recommend pycryptodome package over PyCrypto
Browse files Browse the repository at this point in the history
PyCrypto is old and deprecated, pycryptodome works as a drop-in replacement
  • Loading branch information
exploide committed May 15, 2024
1 parent b6bca75 commit b8d0dd9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doc/Auditing-Kerio-Connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following script can be used to reverse these "D3S" scrambled password strin
#!/usr/bin/env python

import sys
from Crypto.Cipher import DES3 # pip install --user pycrypto
from Crypto.Cipher import DES3 # pip install --user pycryptodome

# Password unscrambler for Kerio Connect.
#
Expand Down Expand Up @@ -180,7 +180,7 @@ follows,
#!/usr/bin/env python

import sys
from Crypto.Cipher import DES # pip install --user pycrypto
from Crypto.Cipher import DES # pip install --user pycryptodome

# Password unscrambler for Kerio Connect.

Expand Down
2 changes: 1 addition & 1 deletion run/DPAPImk2john.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from Crypto.Cipher import DES
from Crypto.Cipher import DES3
except ImportError:
sys.stderr.write("Error: Please install PyCrypto package.\n")
sys.stderr.write("pycryptodome python package is missing, please install it using 'pip install --user pycryptodome' command.\n")
sys.exit(1)

debug = False
Expand Down
8 changes: 4 additions & 4 deletions run/telegram2john.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
from Crypto.Cipher import AES
except ImportError:
check_empty_pass = False
sys.stderr.write("For additional functionality, please install the PyCrypto package.\n")
sys.stderr.write("run 'pip install --user PyCrypto' to install it!\n")
sys.stderr.write("For additional functionality, please install the pycryptodome package.\n")
sys.stderr.write("run 'pip install --user pycryptodome' to install it!\n")

PY3 = sys.version_info[0] == 3

Expand Down Expand Up @@ -153,7 +153,7 @@ def is_correct_ige_decryption(file_path, key, data):

def is_map0_empty_pass(file_path, salt_hex, data_hex):
if not check_empty_pass:
sys.stderr.write("ATTENTION: it couldn't be verified if a password was set for the file/account: '%s' (please install the PyCrypto package)\n" % file_path)
sys.stderr.write("ATTENTION: it couldn't be verified if a password was set for the file/account: '%s' (please install the pycryptodome package)\n" % file_path)
return False

salt = binascii.unhexlify(salt_hex)
Expand All @@ -165,7 +165,7 @@ def is_map0_empty_pass(file_path, salt_hex, data_hex):

def is_key_datas_empty_pass(file_path, salt_hex, data_hex):
if not check_empty_pass:
sys.stderr.write("ATTENTION: it couldn't be verified if a password was set for the file/account: '%s' (please install the PyCrypto package)\n" % file_path)
sys.stderr.write("ATTENTION: it couldn't be verified if a password was set for the file/account: '%s' (please install the pycryptodome package)\n" % file_path)
return False

salt = binascii.unhexlify(salt_hex)
Expand Down

0 comments on commit b8d0dd9

Please sign in to comment.