Skip to content

Commit b2435c9

Browse files
authored
Updated Example
1 parent 1c715da commit b2435c9

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

main.py

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,40 @@
11
from keyauth import api
2-
32
import os
43
import sys
54
import os.path
65
import platform
6+
from time import sleep
77
from datetime import datetime
88

99
# watch setup video if you need help https://www.youtube.com/watch?v=L2eAQOmuUiA
10-
11-
keyauthapp = api("app name here", "owner id here", "app secret here","1.0")
12-
10+
os.system("cls")
11+
os.system("title Python Example")
1312
print("Initializing")
14-
keyauthapp.init()
15-
13+
keyauthapp = api(
14+
name = "",
15+
ownerid = "",
16+
secret = "",
17+
version = "1.0",
18+
)
1619
print ("""
1720
1.Login
1821
2.Register
1922
3.Upgrade
2023
4.License Key Only
2124
""")
25+
print(f"""
26+
App data:
27+
Number of users: {keyauthapp.app_data.numUsers}
28+
Number of online users: {keyauthapp.app_data.onlineUsers}
29+
Number of keys: {keyauthapp.app_data.numKeys}
30+
Application Version: {keyauthapp.app_data.app_ver}
31+
Customer panel link: {keyauthapp.app_data.customer_panel}
32+
""")
33+
sleep(1.5) # rate limit
2234
print(f"Current Session Validation Status: {keyauthapp.check()}")
35+
sleep(1.5) # rate limit
36+
print(f"Blacklisted? : {keyauthapp.checkblacklist()}") # check if blacklisted, you can edit this and make it exit the program if blacklisted
37+
2338
ans=input("Select Option: ")
2439
if ans=="1":
2540
user = input('Provide username: ')
@@ -45,7 +60,11 @@
4560
print("Username: " + keyauthapp.user_data.username)
4661
print("IP address: " + keyauthapp.user_data.ip)
4762
print("Hardware-Id: " + keyauthapp.user_data.hwid)
63+
print("Subcription: " + keyauthapp.user_data.subscription)
4864
print("Created at: " + datetime.utcfromtimestamp(int(keyauthapp.user_data.createdate)).strftime('%Y-%m-%d %H:%M:%S'))
4965
print("Last login at: " + datetime.utcfromtimestamp(int(keyauthapp.user_data.lastlogin)).strftime('%Y-%m-%d %H:%M:%S'))
5066
print("Expires at: " + datetime.utcfromtimestamp(int(keyauthapp.user_data.expires)).strftime('%Y-%m-%d %H:%M:%S'))
5167
print(f"Current Session Validation Status: {keyauthapp.check()}")
68+
print("Exiting in 10 secs....")
69+
sleep(10)
70+
exit(0)

0 commit comments

Comments
 (0)