Skip to content

Sleep on error of functions #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion keyauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
s.get('https://google.com')
except requests.exceptions.RequestException as e:
print(e)
time.sleep(3)
time.sleep(5)
os._exit(1)


Expand Down Expand Up @@ -87,13 +87,15 @@ def init(self):
print("New Version Available")
download_link = json["download"]
os.system(f"start {download_link}")
time.sleep(3)
os._exit(1)
else:
print("Invalid Version, Contact owner to add download link to latest app version")
os._exit(1)

if not json["success"]:
print(json["message"])
time.sleep(3)
os._exit(1)

self.sessionid = json["sessionid"]
Expand Down Expand Up @@ -128,6 +130,7 @@ def register(self, user, password, license, hwid=None):
self.__load_user_data(json["info"])
else:
print(json["message"])
time.sleep(5)
os._exit(1)

def upgrade(self, user, license):
Expand Down Expand Up @@ -157,6 +160,7 @@ def upgrade(self, user, license):
os._exit(1)
else:
print(json["message"])
time.sleep(5)
os._exit(1)

def login(self, user, password, hwid=None):
Expand Down Expand Up @@ -188,6 +192,7 @@ def login(self, user, password, hwid=None):
print("successfully logged in")
else:
print(json["message"])
time.sleep(5)
os._exit(1)

def license(self, key, hwid=None):
Expand Down Expand Up @@ -217,6 +222,7 @@ def license(self, key, hwid=None):
print("successfully logged into license")
else:
print(json["message"])
time.sleep(5)
os._exit(1)

def var(self, name):
Expand Down Expand Up @@ -610,6 +616,7 @@ def encrypt(message, enc_key, iv):
return encryption.encrypt_string(message.encode(), _key.encode(), _iv.encode()).decode()
except:
print("Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username")
time.sleep(5)
os._exit(1)

@staticmethod
Expand All @@ -622,4 +629,5 @@ def decrypt(message, enc_key, iv):
return encryption.decrypt_string(message.encode(), _key.encode(), _iv.encode()).decode()
except:
print("Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username")
time.sleep(5)
os._exit(1)