You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main.py
+9-11Lines changed: 9 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
importsys
2
+
1
3
fromkeyauthimportapi
2
4
importtime
3
5
importos
@@ -9,19 +11,15 @@
9
11
# ^^ only for auto login/json writing/reading
10
12
11
13
# watch setup video if you need help https://www.youtube.com/watch?v=L2eAQOmuUiA
12
-
os.system("cls")
13
-
os.system("title Python Example")
14
+
15
+
os.system("cls & title Python Example")
14
16
print("Initializing")
15
17
16
18
17
19
defgetchecksum():
18
-
path=os.path.basename(__file__)
19
-
ifnotos.path.exists(path):
20
-
path=path[:-2] +"exe"
21
20
md5_hash=hashlib.md5()
22
-
a_file=open(path, "rb")
23
-
content=a_file.read()
24
-
md5_hash.update(content)
21
+
file=open(''.join(sys.argv), "rb")
22
+
md5_hash.update(file.read())
25
23
digest=md5_hash.hexdigest()
26
24
returndigest
27
25
@@ -34,7 +32,7 @@ def getchecksum():
34
32
hash_to_check=getchecksum()
35
33
)
36
34
37
-
print(f"""
35
+
print(f"""1
38
36
App data:
39
37
Number of users: {keyauthapp.app_data.numUsers}
40
38
Number of online users: {keyauthapp.app_data.onlineUsers}
@@ -137,7 +135,7 @@ def answer():
137
135
# * Auto-Login Example (THIS IS JUST AN EXAMPLE --> YOU WILL HAVE TO EDIT THE CODE PROBABLY)
138
136
# 1. Checking and Reading JSON
139
137
140
-
#### Note: Remove the ''' on line 136 and 195
138
+
#### Note: Remove the ''' on line 140 and 199
141
139
142
140
'''try:
143
141
if os.path.isfile('auth.json'): #Checking if the auth file exist
@@ -202,7 +200,7 @@ def answer():
202
200
203
201
# Writing user data on login:
204
202
# Check Keyauth.py file --> Line 158
205
-
# Replace the whole login function with this login function (This has auto user data dumping, so the user only have to login once), dont forget to remove the ''' on line 202,239
203
+
# Replace the whole login function with this login function (This has auto user data dumping, so the user only have to log in once), don't forget to remove the ''' on line 206,243
206
204
# Note: The auto login function above is needed for this bc it creates the auth file, if the auth file is missing this won't work
0 commit comments