forked from tagoWorks/akod
-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up API with Your Code
tago edited this page Apr 27, 2024
·
7 revisions
The AKoDAuth Flask API is a tool for secure user authentication and access control. With customizable database settings, it gives flexibility in deployment across various platforms. Through encryption and decryption functionalities, it securely manages activation keys, private keys, and public keys. The API includes node locking capabilities, restricting access to authorized devices. By cross-referencing hardware IDs, it ensures that user accounts are not used on different devices.
For now AKoDAuth can only be used for Python scripts. If you want to contribute and attempt to expand please feel free. This code is for your program that you will be distributing.
- Set and post your private and public key
private_key = "private key from identifiers.txt" publicserverkey = "public key from identifiers.txt" requests.post('https://api.yourdomain.com/privatekey', data={'key': private_key}) requests.post('https://api.yourdomain.com/publickey', data={'key': publicserverkey})
- Create a way to input activation key, username, and login
activationkey = input ("Enter activation key: ") username = input("Enter username: ") password = input("Enter password: ")
- Create a post request to your API to check for the account credentials (HWID/Node Locking)
requests.post('https://api.yourdomain.com/setactivationkey', data={'key': activationkey}) response = requests.post('https://api.yourdomain.com/validate', data={'username': username, 'password': password})
- If the response is "VALID", start your code!
if response.text == "VALID": print("Hello, World!")
- OPTIONAL In order to hide your private key and licensing website link, I recommend you obfuscate your code with a python obfuscator. Hyperion is very advanced. Additionally, if you create an executable from your python code it will be difficult to decompile.