hypersine / how-does-securecrt-encrypt-password Goto Github PK
View Code? Open in Web Editor NEWTransferred from https://github.com/DoubleLabyrinth/how-does-SecureCRT-encrypt-password
Transferred from https://github.com/DoubleLabyrinth/how-does-SecureCRT-encrypt-password
It seems V2 decrypt fails for the latest version of pycryptodome
.
I have run the script installing the version 3.8.2
(pip3 install pycryptodome==3.8.2
)
PD: This script saves my day!
Everyone , Im make securecrt_cipher.py after appear this Error information : AttributeError: function 'SHA512_init' not found , Please help me . Thank's.
PS E:\Database\python> python securecrt_cipher.py dec -2 --prefix 03 70e0ef15dd8c31f59988e0a2af0bdbe16a572e70157b414619f7c1352846821c1f59e1f19c42708c89a702a9bfc559e3ac861ddc6c2b4d497e437d001e7cd22a012cec2d84a9f270cba9f418c10daecb
Traceback (most recent call last):
File "E:\Database\python\securecrt_cipher_1.py", line 266, in
print(getattr(cipher, operation)(args.PASSWORD, prefix = args.prefix))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Database\python\securecrt_cipher_1.py", line 166, in decrypt
kdf_bytes = bcrypt_pbkdf2(self.config_passphrase, salt, 32 + AES.block_size, 16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Database\python\securecrt_cipher_1.py", line 21, in bcrypt_pbkdf2
out = KDF.PBKDF2(password, salt, out_len, rounds, prf = bcrypt_hash)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Horry\AppData\Roaming\Python\Python311\site-packages\Crypto\Protocol\KDF.py", line 168, in PBKDF2
s = [ prf(password, salt + struct.pack(">I", i)) ] * 2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Database\python\securecrt_cipher_1.py", line 8, in bcrypt_hash
password = SHA512.new(password).digest()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Horry\AppData\Roaming\Python\Python311\site-packages\Crypto\Hash\SHA512.py", line 177, in new
return SHA512Hash(data, truncate)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Horry\AppData\Roaming\Python\Python311\site-packages\Crypto\Hash\SHA512.py", line 85, in init
result = raw_sha512_lib.SHA512_init(state.address_of(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python\Python311\Lib\ctypes_init.py", line 389, in getattr
func = self.getitem(name)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python\Python311\Lib\ctypes_init.py", line 394, in getitem
func = self._FuncPtr((name_or_ordinal, self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: function 'SHA512_init' not found
Notie : my any version information
Windows 11 x86-64bit
Python 3.11.6
pip 23.2.1
Package version :
PS C:\Users\Horry> pip list
Package Version
------------ -------
pip 23.2.1
PyAudio 0.2.11
pycrypto 2.6.1
pycryptodome 3.19.0
setuptools 65.5.0
wheel 0.41.2
It looks like environments above python3.8 are prone to this reporting error, even if you install the “requirements”.
so follow the steps:
pip3 uninstall crypto
pip3 uninstall pycrypto
pip3 install pycrypto
cheers~~and sw74 :)
Getting "file name too long" with the following syntax
sudo ./securecrt_cipher.py dec -2 --prefix 02 9c9b072741bff2069616b3bd47a...8b529278580b69aa8aab0e4b12c21bbfdf58f6089a4a6267782f7658e23e8ab83d9b1d84fa470ead0c1b153418e3c475a731f4e4 encryptionkey
End of the output below
title:how-does-SecureCRT-encrypt-password/python3/securecrt_cipher.py at b069c895bb092f03e87c73e6910e532af2225689 · HyperSine/how-does-SecureCRT-encrypt-password}: File name too long
pycryptodome: 3.19.0
python: 3.9.2
Only thing I can think is that the encryption key is too long @ 36char?
ScureCRT 9.4 with a new type encryption,"Password V2"=03:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi man , I followed the steps you in bellow described,
https://github.com/HyperSine/how-does-SecureCRT-encrypt-password/blob/master/README.md
and I got this error :
E:\Database\python>python securecrt_cipher_1.py dec -2 --prefix 03 70e0ef15dd8**********************ecb
Traceback (most recent call last):
File "E:\Database\python\securecrt_cipher_1.py", line 4, in
from Crypto.Cipher import AES, Blowfish
File "C:\Users\Horry\AppData\Roaming\Python\Python311\site-packages\Crypto\Cipher\Blowfish.py", line 120, in
key_size = xrange(4,56+1)
^^^^^^NameError: name 'xrange' is not defined. Did you mean: 'range'?
Please's help me deal with this problem . Thinks man .
Notie .
and Im python version is : 3.11.6
pip version is : 23.2.1
pycryptodome version is : 3.8.2
That error like :
ScureCRT 9.6
securecrt_cipher.py dec -2 --prefix 02 77*******
raise ValueError('Bad ciphertext: incorrect padding.')
ValueError: Bad ciphertext: incorrect padding.
This script works without any issues when the config password is known, but what about if that's NOT known? When you attempt to decerypt a stored session's password without supplying the config password (using -p ) in the string, you get back an error message about invalid cypher text length. For example, if you have the .ini files from a former employee's saved sessions but don't know the config password they used to get into SecureCRT, how do you decrypt the stored session's hash?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.