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
Go to https://keyauth.cc/app/ and click the Python tab. Copy that code and replace the existing keyauthapp instance in this file.
If you get an error saying it can't find module KeyAuth, try following this https://github.com/KeyAuth/KeyAuth-Python-Example#how-to-compile
If that doesn't work for you, you can paste the contents of KeyAuth.py ABOVE this comment and then remove the "from keyauth import api" and that should work too.
READ HERE TO LEARN ABOUT KEYAUTH FUNCTIONS https://github.com/KeyAuth/KeyAuth-Python-Example#keyauthapp-instance-definition
'''
fromkeyauthimportapi
importsys
importtime
importplatform
importos
importhashlib
fromtimeimportsleep
fromdatetimeimportdatetime, UTC
# import json as jsond
# ^^ only for auto login/json writing/reading
# watch setup video if you need help https://www.youtube.com/watch?v=L2eAQOmuUiA
defclear():
ifplatform.system() =='Windows':
os.system('cls & title Python Example') # clear console, change title
elifplatform.system() =='Linux':
os.system('clear') # Clear the terminal
sys.stdout.write("\033]0;Python Example\007") # Set terminal title
sys.stdout.flush()
elifplatform.system() =='Darwin':
os.system("clear && printf '\033[3J'") # Clear terminal and scrollback
os.system('echo -n -e "\033]0;Python Example\007"') # Set terminal title
print("Initializing")
defgetchecksum():
md5_hash=hashlib.md5()
file=open(''.join(sys.argv), "rb")
md5_hash.update(file.read())
digest=md5_hash.hexdigest()
returndigest
keyauthapp=api(
name="", # App name
ownerid="", # Account ID
version="", # Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
hash_to_check=getchecksum()
)
defanswer():
try:
print("""1.Login
2.Register
3.Upgrade
4.License Key Only
""")
ans=input("Select Option: ")
ifans=="1":
user=input('Provide username: ')
password=input('Provide password: ')
code=input('Enter 2fa code: (not using 2fa? Just press enter)')
keyauthapp.login(user, password, code)
elifans=="2":
user=input('Provide username: ')
password=input('Provide password: ')
license=input('Provide License: ')
keyauthapp.register(user, password, license)
elifans=="3":
user=input('Provide username: ')
license=input('Provide License: ')
keyauthapp.upgrade(user, license)
elifans=="4":
key=input('Enter your license: ')
code=input('Enter 2fa code: (not using 2fa? Just press enter)')
keyauthapp.license(key, code)
else:
print("\nInvalid option")
sleep(1)
clear()
answer()
exceptKeyboardInterrupt:
os._exit(1)
answer()
'''try:
if os.path.isfile('auth.json'): #Checking if the auth file exist
if jsond.load(open("auth.json"))["authusername"] == "": #Checks if the authusername is empty or not
print("""
1. Login
2. Register
""")
ans=input("Select Option: ") #Skipping auto-login bc auth file is empty