priyankchheda / chrome_password_grabber Goto Github PK
View Code? Open in Web Editor NEWGet unencrypted 'Saved Password' from Google Chrome
License: GNU General Public License v3.0
Get unencrypted 'Saved Password' from Google Chrome
License: GNU General Public License v3.0
The first line of how to use says
>>> from chrome_passwd import ChromePasswd
by the file is not called chrome_password
. Changing it gives
>>> from chrome import ChromePasswd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'ChromePasswd' from 'chrome' (/tmp/chrome_password_grabber/chrome.py)
The .py
file on that repository has no ChromePasswd
Method or Class.
So there a lot of changes must have happened since the README was last updated?
a
jason@archlinux ~/.config/google-chrome/Default $ python getpasswords.py
/home/jason/.config/google-chrome/Default/
Traceback (most recent call last):
File "/home/jason/.config/google-chrome/Default/getpasswords.py", line 157, in
main()
File "/home/jason/.config/google-chrome/Default/getpasswords.py", line 153, in main
chrome_pwd.get_password(prettyprint=True)
File "/home/jason/.config/google-chrome/Default/getpasswords.py", line 133, in get_password
_passwd = self.chrome_os.decrypt_func(result[2])
File "/home/jason/.config/google-chrome/Default/getpasswords.py", line 98, in decrypt_func
cipher = aes.new(self.key, aes.MODE_CBC, IV=initialization_vector)
File "/home/jason/.local/lib/python3.10/site-packages/Crypto/Cipher/AES.py", line 95, in new
return AESCipher(key, *args, **kwargs)
File "/home/jason/.local/lib/python3.10/site-packages/Crypto/Cipher/AES.py", line 59, in init
blockalgo.BlockAlgo.init(self, _AES, key, *args, **kwargs)
File "/home/jason/.local/lib/python3.10/site-packages/Crypto/Cipher/blockalgo.py", line 141, in init
self._cipher = factory.new(key, *args, **kwargs)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
???
-db
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 1: invalid continuation byte
Happened after changing the location to the correct folder.
In my case the folder is /home/yaron/.config/chromium/Default/Login Data
instead of google-chrome
.
Change Line 116 from
passwd = ''.join(i for i in _passwd if i in string.printable)
to
passwd = ''.join(i for i in str(_passwd) if i in string.printable)
Maybe you could merge the code from this: https://github.com/mehulj94/Snatch/blob/master/Snatch.py repo to support cookie stealing.
Hi.
How to standalone use chrome_password_grabber.py ?
I've never used python, and I don't know how to use this code. Is it possible to pass the path to the database to the script
chrome_password_grabber.py ./Login\ Data
and get the passwords at the output ?
Does it work on macOS even if cloud synchronization is enabled?
For some reason it doesn't detect that Crypto
is installed.
Using Fedora Linux 32 64bit.
# pip install Crypto
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting Crypto
Downloading https://files.pythonhosted.org/packages/fc/bb/0b812dc02e6357606228edfbf5808f5ca0a675a84273578c3a199e841cd8/crypto-1.4.1-py2.py3-none-any.whl
Collecting shellescape
Downloading https://files.pythonhosted.org/packages/d0/f4/0081137fceff5779cd4205c1e96657e41cc2d2d56c940dc8eeb6111780f7/shellescape-3.8.1-py2.py3-none-any.whl
Collecting Naked
Downloading https://files.pythonhosted.org/packages/02/36/b8107b51adca73402ec1860d88f41d958e275e60eea6eeaa9c39ddb89a40/Naked-0.1.31-py2.py3-none-any.whl (590kB)
|████████████████████████████████| 593kB 13.9MB/s
Requirement already satisfied: requests in /usr/lib/python3.8/site-packages (from Naked->Crypto) (2.22.0)
Requirement already satisfied: pyyaml in /usr/local/lib64/python3.8/site-packages (from Naked->Crypto) (5.3.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.8/site-packages (from requests->Naked->Crypto) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3.8/site-packages (from requests->Naked->Crypto) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.8/site-packages (from requests->Naked->Crypto) (1.25.7)
Installing collected packages: shellescape, Naked, Crypto
Successfully installed Crypto-1.4.1 Naked-0.1.31 shellescape-3.8.1
/tmp/chrome_password_grabber$ python
Python 3.8.6 (default, Sep 25 2020, 00:00:00)
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from chrome import Chrome
>>> chrome_pwd = Chrome()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/chrome_password_grabber/chrome.py", line 113, in __init__
self.chrome_os = ChromeLinux()
File "/tmp/chrome_password_grabber/chrome.py", line 89, in __init__
kdf = import_module('Crypto.Protocol.KDF')
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'Crypto'
>>>
1.-) Im new at python and i don't know how to run this project.
2.-) Please tell me process i have to do.
3.-) I have Login Data file its possible for grabbing passwords?
Hello.
I reinstall my system to debian. When i copy files from my old system. And after i try use your script it print error
File "/home/shor/chrome.py", line 157, in <module> main() File "/home/shor/chrome.py", line 153, in main chrome_pwd.get_password(prettyprint=True) File "/home/shor/chrome.py", line 133, in get_password _passwd = self.chrome_os.decrypt_func(result[2]) File "/home/shor/chrome.py", line 99, in decrypt_func decrypted = cipher.decrypt(enc_passwd) File "/home/shor/.local/lib/python3.9/site-packages/Crypto/Cipher/_mode_cbc.py", line 246, in decrypt raise ValueError("Data must be padded to %d byte boundary in CBC mode" % self.block_size) ValueError: Data must be padded to 16 byte boundary in CBC mode
Hi all!
I have an issue after the installation of dependencies :
The error concern the env var called DBUS_SESSION_BUS_ADDRESS
I tried without SUDO:
_Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/init.py", line 72, in dbus_init
connection = open_dbus_connection()
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 255, in open_dbus_connection
conn = DBusConnection(sock)
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 68, in init
hello_reply = self.bus_proxy.Hello()
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 223, in inner
return self._connection.send_and_get_reply(
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 134, in send_and_get_reply
self.send_message(message, serial=serial)
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 83, in send
self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/scripts/chrome_password_grabber/./decrypt_chrome_pass_ulti.py", line 2, in
chrome_pwd = Chrome()
File "/scripts/chrome_password_grabber/chrome.py", line 113, in init
self.chrome_os = ChromeLinux()
File "/scripts/chrome_password_grabber/chrome.py", line 79, in init
bus = secretstorage.dbus_init()
File "/usr/lib/python3/dist-packages/secretstorage/init.py", line 80, in dbus_init
raise SecretServiceNotAvailableException(str(ex)) from ex
secretstorage.exceptions.SecretServiceNotAvailableException: [Errno 32] Broken pipe_
Then I tried wiith SUDO:
_sudo python3 ./decrypt_chrome_pass_ulti.py
sudo: impossible de résoudre l'hôte Parrot: Nom ou service inconnu
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/init.py", line 72, in dbus_init
connection = open_dbus_connection()
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 243, in open_dbus_connection
bus_addr = get_bus(bus)
File "/usr/lib/python3/dist-packages/jeepney/bus.py", line 53, in get_bus
return find_session_bus()
File "/usr/lib/python3/dist-packages/jeepney/bus.py", line 42, in find_session_bus
addr = os.environ['DBUS_SESSION_BUS_ADDRESS']
File "/usr/lib/python3.9/os.py", line 679, in getitem
raise KeyError(key) from None
KeyError: 'DBUS_SESSION_BUS_ADDRESS'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/scripts/chrome_password_grabber/./decrypt_chrome_pass_ulti.py", line 2, in
chrome_pwd = Chrome()
File "/scripts/chrome_password_grabber/chrome.py", line 113, in init
self.chrome_os = ChromeLinux()
File "/scripts/chrome_password_grabber/chrome.py", line 79, in init
bus = secretstorage.dbus_init()
File "/usr/lib/python3/dist-packages/secretstorage/init.py", line 78, in dbus_init
raise SecretServiceNotAvailableException(reason) from ex
secretstorage.exceptions.SecretServiceNotAvailableException: Environment variable DBUS_SESSION_BUS_ADDRESS is unset_
Hi,
the following description of the Linux implementation is not true:
on Linux:
password is peanuts
The implementation depends on the used password store (option: --password-store=<basic|gnome|kwallet>
). The password is peanuts only if the basic store is used. In default, it detects automatically if KWallet or Gnome keyring is available and storing a random password there.
it's somme not perfect in windows. beacuase i use the dev chrome and whitch path like this :
C:\Users\mrxn\AppData\Local\Google\chrome dev\User Data\Default\
and the stable chrome version path is:
C:\Users\mrxn\AppData\Local\Google\chrome\User Data\Default\
that's all
thanks.
Exception has occurred: error
(87, 'CryptProtectData', 'The parameter is incorrect.')
File "C:\Users*\Desktop\Coding\Garbage Coding\chrome.py", line 67, in decrypt_func
data = win32crypt.CryptUnprotectData(enc_passwd, None, None, None, 0)
File "C:\Users*\Desktop\Coding\Garbage Coding\chrome.py", line 130, in get_password
_passwd = self.chrome_os.decrypt_func(result[2])
File "C:\Users**\Desktop\Coding\Garbage Coding\pog.py", line 5, in
chrome_pwd.get_password(prettyprint=True)
"password": "sY/f\f\rr"\n
"password": "iL\u000b<*ood"\n
"password": "sY/f\f\rr"\n
"password": "R/+ed0H"\n
some password like this.... it's not actual password...
>>> from chrome import Chrome
>>> c = Chrome()
Traceback (most recent call last):
File "/usr/local/lib/python3/site-packages/secretstorage/__init__.py", line 73, in dbus_init
connection = open_dbus_connection()
File "/usr/local/lib/python3/site-packages/jeepney/io/blocking.py", line 344, in open_dbus_connection
conn = DBusConnection(sock, enable_fds)
File "/usr/local/lib/python3/site-packages/jeepney/io/blocking.py", line 139, in __init__
hello_reply = self.bus_proxy.Hello()
File "/usr/local/lib/python3/site-packages/jeepney/io/blocking.py", line 279, in inner
return unwrap_msg(self._connection.send_and_get_reply(
File "/usr/local/lib/python3/site-packages/jeepney/io/blocking.py", line 193, in send_and_get_reply
self.send_message(message, serial=serial)
File "/usr/local/lib/python3/site-packages/jeepney/io/blocking.py", line 154, in send
self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/teacher/.config/chromium/Default/chrome_password_grabber/chrome.py", line 114, in __init__
self.chrome_os = ChromeLinux()
File "/home/teacher/.config/chromium/Default/chrome_password_grabber/chrome.py", line 80, in __init__
bus = secretstorage.dbus_init()
File "/usr/local/lib/python3/site-packages/secretstorage/__init__.py", line 81, in dbus_init
raise SecretServiceNotAvailableException(str(ex)) from ex
secretstorage.exceptions.SecretServiceNotAvailableException: [Errno 32] Broken pipe
Linux KDE, x86_64 GNU/Linux
i'm trying to do it via ssh
Python 3.9.6
Is this code still working?
If yes can you please help me solve this error:
ModuleNotFoundError: No module named 'win32crypt'
I am using windows 10
Add support for Chrome canary, dev and beta for all three operating system.
larry@LarryDeMBP chrome_password_grabber-master % python chrome.py
even I configured utf8 still get this error....but I checked the code line #50, it has utf8, why still has this error??
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.