Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

cracked.io | Best Forum Around | Free Premium Accounts




 408

HELP: Cracked.to Python Authentication.

by Scream - 09 August, 2021 - 11:07 PM
This post is by a banned member (Scream) - Unhide
Scream  
Supreme
1.311
Posts
160
Threads
4 Years of service
#1
(This post was last modified: 09 August, 2021 - 11:14 PM by Scream. Edited 1 time in total.)
Alrighty, so I know how to do the authentication for python, etc I have it working, 1 thing I do not have working is making a txt file and placing the key in the file, then on next launch it remembers the key and boots right into the program, Currently it only makes a .txt file and puts the key in there, this is my code below:
 
Code:
 
uuid = check_output('wmic csproduct get uuid').decode().split('\n')[1].split(' ')[0]

if os.path.isfile('key.txt'):
    with open('key.txt') as f:
        key = f.read().strip()
        

key = str(input('> Authentication Key: '))
with open('key.txt', 'w') as f:
            f.write(key)

data = {
    'a': 'auth',
    'k': key,
    'hwid': uuid
}

r = requests.post('https://cracked.to/auth.php', data=data)
if r.ok:
    res = r.json()
    if 'error' in res:
        print(res["error"])
        if (os.path.exists("key.txt")):
            os.remove("key.txt")

infinity_plus = ['12', '93', '96', '97', '99', '100', '101', '4', '3', '6', '94', '92']

check = post('https://cracked.to/auth.php', data = data)
if 'error' not in check.text:
    group = check.json()['group']
    if group in infinity_plus:
        print('\n> Successfully authenticated.')
    else:
        print('\n> You need to be at least Infinity+ in order to gain access.')
elif 'invalid key' in check.text:
    print('\n> Invalid authentication key.')
elif 'invalid hwid' in check.text:
    print('\n> HWID mismatch. Create a new authentication key.')
Can someone please send me something that works down in the comments <3 Ill give you a big kiss :3
This post is by a banned member (ZeroTolerance) - Unhide
148
Posts
19
Threads
4 Years of service
#2
(This post was last modified: 09 August, 2021 - 11:22 PM by ZeroTolerance.)
why not something like this?
or do you want if the key is invalid not to save it in the text?
Code:
 
if os.path.isfile('key.txt'):
    with open('key.txt') as f:
        key = f.read().strip()
else:
    key = str(input('> Authentication Key: '))
This post is by a banned member (Scream) - Unhide
Scream  
Supreme
1.311
Posts
160
Threads
4 Years of service
#3
(09 August, 2021 - 11:22 PM)ZeroTolerance Wrote: Show More
why not something like this?
or do you want if the key is invalid not to save it in the text?
Code:
 
if os.path.isfile('key.txt'):
    with open('key.txt') as f:
        key = f.read().strip()
else:
    key = str(input('> Authentication Key: '))

This works well! tysm

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)