you need to set up Google Cloud credentials and provide the correct path to the service-account.json file.
Here’s how to properly configure the script:
Step 1: Set Up Google Cloud Credentials
- Create a Google Cloud Project:
- Enable the Google Drive API:
- Navigate to APIs & Services > Library.
- Search for Google Drive API and enable it.
- Create a Service Account:
- Go to IAM & Admin > Service Accounts.
- Click Create Service Account.
- Name it (e.g.,
cloud-phantom-c2).
- Assign the role Editor (or a custom role with Drive access).
- Click Done.
- Generate and Download the Credentials:
- In the service account details, go to the Keys tab.
- Click Add Key > Create New Key.
- Choose JSON and download the file.
- Rename the downloaded file to
service-account.json.
- Share the CNC Folder with the Service Account:
- Create a folder in Google Drive (e.g.,
CNC).
- Share the folder with the service account email (found in the
service-account.json file under client_email).
- Grant Editor permissions.
Step 2: Update the Script
Place the service-account.json file in the same directory as the script, or update the SERVICE_ACCOUNT_FILE variable to point to the correct path.
For example:
SERVICE_ACCOUNT_FILE = '/path/to/service-account.json'
Step 3: Install Required Dependencies
Make sure you have the required Python libraries installed:
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client pycryptodome stegano colorama inquirer pyfiglet
Step 4: Run the Script