-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_data.py
39 lines (34 loc) · 1.1 KB
/
get_data.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
import sqlite3
database_name = "pass_manager.dll"
def login():
conn = sqlite3.connect(database_name)
cursor = conn.cursor()
cursor.execute(f'''SELECT * from auth_user''')
result = cursor.fetchone()
return result
def view_user():
conn = sqlite3.connect(database_name)
cursor = conn.cursor()
cursor.execute('''SELECT * from pass_info''')
result = cursor.fetchall()
return result
def view(id):
conn = sqlite3.connect(database_name)
cursor = conn.cursor()
cursor.execute(f'''SELECT * from pass_info where id = '{id}' ''')
result = cursor.fetchone()
return result
def status():
conn = sqlite3.connect(database_name)
cursor = conn.cursor()
cursor.execute(f'''SELECT * from auth_user ''')
# cursor.execute(f'''SELECT * from auth_user where id = '1' ''')
result = cursor.fetchone()
return result
def webview():
conn = sqlite3.connect(database_name)
cursor = conn.cursor()
# cursor.execute(f'''SELECT * from webview ''')
cursor.execute(f'''SELECT * from webview where id = '1' ''')
result = cursor.fetchone()
return result