mega-account-generator is a tool used to generate Mega accounts using Gmail and Megatools.
- Python 3.11.0
- Megatools: Download Megatools
pip install -r requirements.txt
To use Gmail API, you need to configure it in the Google Cloud console. Follow the steps below:
- Go to Set up your environment and follow all the instructions.
- Make sure to select User type as External in OAuth consent screen and grant all Gmail Scopes.
- Follow the instructions to complete the setup.
- Save the downloaded JSON file as credentials.json, and move the file to your working directory.
generate-mega.py
: Generates Mega accounts.signin_accounts.py
: Keeps Mega accounts alive (Thanks to f-o/MEGA-Account-Generator).refresh-token.py
: Generatestoken.pickle
used for Gmail authentication.
- Replace the
MEGATOOLS
variable ingenerate-mega.py
with your Megatools path. - Replace the
MAIL
variable ingenerate-mega.py
with your gmail username. - Run
python refresh-token.py
to generatetoken.pickle
(Run only once and make sure to run on local machine rather than a server). - Copy
token.pickle
to your working folder (Only needed if you plan to run the script on a server, otherwise ignore as it creates the file in the working directory itself). - Run
python generate-mega.py
.
python generate-mega.py --help
usage: generate-mega.py [-h] [--n N]
Generate Mega Accounts
options:
-h, --help show this help message and exit
--n N The number of mega accounts to generate