Skip to content

Commit 6cb1578

Browse files
committed
Fix register userdata bug
1 parent fc07a76 commit 6cb1578

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

keyauth.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,12 @@ def register(self, user, password, license, hwid=None):
114114
}
115115

116116
response = self.__do_request(post_data)
117-
118117
response = encryption.decrypt(response, self.enckey, init_iv)
119-
120118
json = jsond.loads(response)
121119

122120
if json["success"]:
123121
print("successfully registered")
122+
self.__load_user_data(json["info"])
124123
else:
125124
print(json["message"])
126125
sys.exit()
@@ -147,6 +146,8 @@ def upgrade(self, user, license):
147146

148147
if json["success"]:
149148
print("successfully upgraded user")
149+
print("please restart program and login")
150+
sys.exit()
150151
else:
151152
print(json["message"])
152153
sys.exit()
@@ -511,4 +512,4 @@ def decrypt(message, enc_key, iv):
511512
return encryption.decrypt_string(message.encode(), _key.encode(), _iv.encode()).decode()
512513
except:
513514
print("Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username")
514-
sys.exit()
515+
sys.exit()

main.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ def getchecksum():
2929
version = "1.0",
3030
hash_to_check = getchecksum()
3131
)
32-
print ("""
33-
1.Login
34-
2.Register
35-
3.Upgrade
36-
4.License Key Only
37-
""")
3832
print(f"""
3933
App data:
4034
Number of users: {keyauthapp.app_data.numUsers}
@@ -43,11 +37,14 @@ def getchecksum():
4337
Application Version: {keyauthapp.app_data.app_ver}
4438
Customer panel link: {keyauthapp.app_data.customer_panel}
4539
""")
46-
sleep(1.5) # rate limit
4740
print(f"Current Session Validation Status: {keyauthapp.check()}")
48-
sleep(1.5) # rate limit
4941
print(f"Blacklisted? : {keyauthapp.checkblacklist()}") # check if blacklisted, you can edit this and make it exit the program if blacklisted
50-
sleep(1.5)
42+
print ("""
43+
1.Login
44+
2.Register
45+
3.Upgrade
46+
4.License Key Only
47+
""")
5148
ans=input("Select Option: ")
5249
if ans=="1":
5350
user = input('Provide username: ')
@@ -62,6 +59,7 @@ def getchecksum():
6259
user = input('Provide username: ')
6360
license = input('Provide License: ')
6461
keyauthapp.upgrade(user,license)
62+
6563
elif ans=="4":
6664
key = input('Enter your license: ')
6765
keyauthapp.license(key)
@@ -126,4 +124,4 @@ def getchecksum():
126124
print(f"Current Session Validation Status: {keyauthapp.check()}")
127125
print("Exiting in 10 secs....")
128126
sleep(10)
129-
exit(0)
127+
exit(0)

0 commit comments

Comments
 (0)