Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Message

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

Global variable for plan

plan = ""

# Function to send message to Discord webhook


def send_to_discord_webhook(message):
webhook_url =
"https://discord.com/api/webhooks/1222552623786360835/mGfs2EXGwC_3kywia5C_iCbFi5qOy
Xie5DaX5xdpNvTt1ImcGOU5mi6dAUFqK9IzbgVN"
data = {"content": message}
requests.post(webhook_url, json=data)

# File path for storing user accounts


users_file_path = "Accounts.json"

# Dictionary to store issue dates of 7-day and 1-month license keys


license_key_issue_date = {}

# Function to save users to file


def save_users_to_file(users):
with open(users_file_path, 'w') as file:
json.dump(users, file)

# Function to load users from file


def load_users_from_file():
try:
with open(users_file_path, 'r') as file:
return json.load(file)
except FileNotFoundError:
return {}

# Function to validate lifetime license key


def validate_lifetime_key(license_key):
lifetime_keys = [
"QUORIX-LIFETIME-AS12ZXCV3BN45QWER67TYUI89",
"QUORIX-LIFETIME-QW34RETY78UIBH2NM1ZAQ6SX5",
"QUORIX-LIFETIME-PO98NBVC6ZXASQ2WED5RFV3TG",
"QUORIX-LIFETIME-LM67aRST8bUVW1cDEF2GHI3JKL",
"QUORIX-LIFETIME-JK56UIOP4QWER78TYDFG9H1AS2",
]
return license_key in lifetime_keys

# Function to validate 7-day license key


def validate_7day_key(license_key):
seven_days_keys = [
"QUORIX-7DAYS-EDCQW01AS2ZXC3VFVGBYHU4NJMK",
"QUORIX-7DAYS-UI89ASDF0GHJ1QWERTY2ASXCV3B",
"QUORIX-7DAYS-5LKJIU67YTRFVB89EDCQW01AS2Z",
"QUORIX-7DAYS-3NMPO5LKJIU67YTRFVB89EDCQW0",
"QUORIX-7DAYS-34RETY78UIBH2NM1ZAQ6SX5CDVF",
]
return license_key in seven_days_keys

# Function to validate 1-month license key


def validate_1month_key(license_key):
one_month_keys = [
"QUORIX-1MONTH-9ASDF0GHJ1QWERTY2ASXCV3BN4",
"QUORIX-1MONTH-8NBVC6ZXASQ2WED5RFV3TGBYH1",
"QUORIX-1MONTH-23NMPO5LKJIU67YTRFVB89EDCQ",
"QUORIX-1MONTH-78UIBH2NM1ZAQ6SX5CDVF9FG8N",
"QUORIX-1MONTH-56UIOP4QWER78TYDFG9H1AS2Z3",
]
return license_key in one_month_keys

# Function to validate license key


def validate_license_key(license_key):
global plan
if validate_lifetime_key(license_key):
plan = "Lifetime"
return True
elif validate_7day_key(license_key):
plan = "7-Day"
license_key_issue_date[license_key] = datetime.now()
return True
elif validate_1month_key(license_key):
plan = "1-Month"
license_key_issue_date[license_key] = datetime.now()
return True
else:
return False

# Function to check if a 7-day license key is expired


def is_7day_key_expired(license_key):
return datetime.now() > license_key_issue_date.get(license_key, datetime.now())
+ timedelta(days=7)

# Function to check if a 1-month license key is expired


def is_1month_key_expired(license_key):
return datetime.now() > license_key_issue_date.get(license_key, datetime.now())
+ timedelta(days=30)

# Function to get user's plan


def get_user_plan(username):
users = load_users_from_file()
license_key = users[username]['license_key']
if validate_lifetime_key(license_key):
return "Lifetime"
elif validate_7day_key(license_key):
if is_7day_key_expired(license_key):
return "Expired 7-Day"
else:
return "7-Day"
elif validate_1month_key(license_key):
if is_1month_key_expired(license_key):
return "Expired 1-Month"
else:
return "1-Month"
return "Unknown"

# Function to perform login or registration


def login_or_register():
global plan
users = load_users_from_file()
if 'logged_in_user' in users:
username = users['logged_in_user']
plan = get_user_plan(username)
ctypes.windll.kernel32.SetConsoleTitleW(f'''Welcome Back! {username} ''')
loged = (f"""
██████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗██╗ ██╗
██╔═══██╗██║ ██║██╔═══██╗██╔══██╗██║╚██╗██╔╝
██║ ██║██║ ██║██║ ██║██████╔╝██║ ╚███╔╝
██║▄▄ ██║██║ ██║██║ ██║██╔══██╗██║ ██╔██╗
╚██████╔╝╚██████╔╝╚██████╔╝██║ ██║██║██╔╝ ██╗
╚══▀▀═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝

WELCOME BACK {username}!


{plan} {L1}PLAN IN USE
""")
print(f"{Center.XCenter(vgratient(loged, [178, 114, 242], [178, 114,
242]))}{RESET}")
time.sleep(2)
return
ctypes.windll.kernel32.SetConsoleTitleW(f'''Quorix Premium | LOG IN / REGISTER
''')
self = f"""
██████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗██╗ ██╗
██╔═══██╗██║ ██║██╔═══██╗██╔══██╗██║╚██╗██╔╝
██║ ██║██║ ██║██║ ██║██████╔╝██║ ╚███╔╝
██║▄▄ ██║██║ ██║██║ ██║██╔══██╗██║ ██╔██╗
╚██████╔╝╚██████╔╝╚██████╔╝██║ ██║██║██╔╝ ██╗
╚══▀▀═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝

"""
print(f"{Center.XCenter(vgratient(self, [178, 114, 242], [178, 114, 242]))}
{RESET}")

license_key_valid = False
while not license_key_valid:
license_key = input(f'''{L1} [+] ENTER THE
LICENSE KEY: ''')
if validate_license_key(license_key):
license_key_valid = True
choice = input(" [+] LOG IN / REGISTER
").lower()
if choice == 'login':
login(users, license_key)
elif choice == 'register':
register(users, license_key)
else:
print(" [+] INVALID CHOICE, ONLY
CHOOSE FROM 'LOGIN / REGISTER.")
login_or_register()
else:
print(" [+] LICENSE KEY IS INVALID OR
EXPIRED. ACCESS DENIED.")
reset()

# Function to handle user login


def login(users, license_key):
global plan
name = input(" [USERNAME]: ")
password = input(" [PASSWORD]: ")

if name in users and users[name]['password'] == password:


print("Login successful!")
users['logged_in_user'] = name
save_users_to_file(users)
plan = get_user_plan(name)
else:
print("Incorrect username or password. Please try again.")
login_or_register()

# Function to handle user registration


def register(users, license_key):
global plan
username = input(" [NEW USERNAME] ")

if username in users:
print("Username already exists. Please choose another one.")
register(users, license_key)
else:
password = input(" [NEW PASSWORD] ")
users[username] = {'password': password, 'license_key': license_key}
save_users_to_file(users)
print("Registration successful!")
users['logged_in_user'] = username
save_users_to_file(users)
plan = get_user_plan(username)

You might also like