This python script generates nitro gifts from the Opera GX promotion that runs till July 16, 2024.
This Python script is designed to send a series of POST requests to a specific URL and record the responses. Here's a step-by-step breakdown of its functionality:
-
The script starts by importing necessary modules and initializing colorama, a module used for colored console output.
-
It then asks the user to input the number of requests they would like to make.
-
The script clears the console and prepares to send the requests.
-
For each request, the script generates a new UUID and sends a POST request to the specified URL with the UUID as part of the request data.
-
If the response status code is 200 (indicating a successful request), the script checks for a 'token' in the response data. If a token is found, the script increments a counter of successful requests and writes a link containing the token to a file named 'generatedcodes.txt'.
-
If the response status code is 429, the script informs the user that they are being rate-limited. If the status code is anything else, the script informs the user that the request failed.
-
While the requests are being made, the script displays an animation in the console and updates the console title with the number of successful requests.
-
Once all requests have been made, the script clears the console and displays a final message indicating the number of successful requests.
-
The script then waits for the user to press any key before exiting.
To use the python script, you need to run:
pip install requests colorama
or install via requirements.txt
-
After installing the requirements, open a terminal where you have the python script and run
python generator.py
-
The python script will ask how many gift links you would like to generate (example: 5)
-
The python script will generate the 5 links into the file
generatedcodes.txt
-
After generating, the console will be cleared and say "Successfully generated (number of generated codes here)!" and ask press any key to close.