Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TuT]How to bypass Google Drive quotas with service accounts

How to bypass Google Drive quotas with service accounts
[Image: Loa5jC0.png]

Table of Contents:
1. Introduction

2. Create Accounts

3. Running the Scripts

4. Adding Service Accounts to TeamDrive

5. Setting-up Team Drive

6. Start Copying

7. Find the Destination ID

8. Conclusion



1. Introduction


Hello, guys Here I have come up with another tutorial. This tutorial will show you how to automate service accounts on Google teamdrives. You may wonder why the service account is useful. The service accounts can be used to bypass the 750Gb/day upload limit set by google in Google drive. It means that you can use them to upload more than 750Gb per day, duplicate hundreds of files.
Each service account has a 750Gb upload limit per day. You can create up to 100 service account per google cloud project. So, with 100 service accounts, you can upload/duplicate up to 75Tb a day!

2. Create Accounts

1. Go to the Google Cloud Console and if you don't have an existing project, create a new one. Name it something you want, REMEMBER what you named it. Do not forget.
https://console.cloud.google.com/
Spoiler (Click to View)

2. Now we need to give that project access to the drive API
https://console.developers.google.com/ap...om?q=drive

3. We also need to enable this API
https://console.cloud.google.com/marketp...leapis.com

4. Now we want to make an "app" to get credentials, but before we do that we need to give "consent"
https://console.cloud.google.com/apis/cr...ls/consent
With this, you want to give "external"
Spoiler (Click to View)

5. The "app name" can be the same as the "project name" you gave at the first step.
Next to that, you need to select a "user support email", just select your own Gmail
Don't forget to fill the same Gmail at the "developer contact info"
Spoiler (Click to View)
Click next and, you don't need to fill anything in and just go back to the dashboard when it prompts you to.

6. Now we go to the credentials tab.
https://console.cloud.google.com/apis/credentials

Click "Create credentials" and select "OAuth client id"
As for application type, select "desktop app"
Spoiler (Click to View)

7. Name your application to your project name.

8. Click on the download button on the right of your OAuth Client IDs and rename the downloaded file to "credentials.json"

9.Now we need to publish the app we made.
https://console.cloud.google.com/apis/cr...ls/consent
Spoiler (Click to View)

3. Running the Script
1. Download and install python on your computer
https://www.python.org/downloads/
Select your operating system and make sure that "add python to path" is check-marked, just click the normal install, and that's it.
Spoiler (Click to View)

2. Now, download the following script and put the "credentials.json" (You downloaded it earlier) file into it.
google.com/file/d/1CGhokG0MhX8wSOiyXNAfqk8VFsNWfDNF/view?usp=sharing]Click to Download the Script

3. To make the script work, we need to download the requirements.
To do that, we need to open a terminal in the folder and paste in this command:
Spoiler (Click to View)
At the path, type in "cmd" and press enter
Code
pip install -U -r requirements.txt
It will install everything you need, just exit the terminal by typing in "exit".

4. Now we create service accounts using existing projects (do not create more projects)
Open the terminal again by repeating the previous step (At the path, type in "cmd" and press enter)
Code
py gen_sa_accounts.py --quick-setup -1
WARNING: This will overwrite the existing service accounts!

5. After executing the code, we need to permit it to work.
Spoiler (Click to View)
Copy that link and paste this into your browser.

6. It will show you an error "Google hasn't verified the app"
we need to ignore this by pressing "advanced"
And then "go to (app name) unsafe"
Spoiler (Click to View)

7. Now agree on all the permissions, clicking on "allow"
After you confirmed them, you can copy the code Google gives you and paste that into the terminal.
Spoiler (Click to View)

8. Now you will see this, just press enter.
Spoiler (Click to View)

9. As the software is poor quality, it will give errors and make more credentials than needed, we will have to sort that through (the software still works so don't panic if it gives errors)
Simply go to the accounts folder and start opening the files, make sure to sort the files by "date modified"
[Image: zxA2bua.png]

10. You are looking for this line, it should be the same as your project name.
[Image: KJcoIW2.jpg]

11. If file 1 to 100 contains the wrong id, you delete those files, and If files 201 to 400 are also wrong, delete them as well.
Do keep in mind that you may not have 100 service accounts, but sometimes lower. (for me it was perfect)
We now need to make a giant list of emails inside a text file.

For Windows users:,
open PowerShell inside the accounts folder by typing "PowerShell" into the file path.
Then run,
Code
$emails = Get-ChildItem .\**.json |Get-Content -Raw |ConvertFrom-Json |Select -ExpandProperty client_email >>emails.txt

For Linux / macOS users:
Run inside the accounts folder
Code
grep -oPh '"client_email": "\K[^"]+' *.json > emails.txt

Open the emails.txt file, we will need it for the next step.

4. Adding Service Accounts to TeamDrive

1. To keep track and also add service accounts to team drives, we need to make a Google group.
Go to: https://groups.google.com/my-groups  and click "Create Group"

2. Name the group the same as your project name.
Spoiler (Click to View)

3. Click next, for this page, we want to put the 3 sliders to the left like this:
Spoiler (Click to View)

4. Now you made the group, click on it to enter the group.

5. At the left menu, click "Members."
Spoiler (Click to View)

6. Now click "add members"

7. Copy everything from the "emails.txt" file and paste it directly into "group members" (Yes this takes a while, just wait.)
Spoiler (Click to View)

5. Setting-up Team Drive

1. Now we need to get a teamdrive, you can use any teamdrive generator, I like using this one.
https://td.msgsuite.workers.dev/

When you have a teamdrive, we are going to add service accounts to it
https://drive[WARNING POSSIBLY INFECTED]google.com/drive/shared-drives

2. Right-click onto your teamdrive and press "manage members"
Spoiler (Click to View)

3. Press done, and you're ready to start copying!

6. Start Copying


1. We start off by downloading rclone.
https://rclone.org/downloads/

Extract it and next download this and extract it inside the rclone folder.
google.com/file/d/1eXA-rkfE0_1cqY-Vskp86ke55aACYuYk/view?usp=sharing]Click to Download

2. We will put the service accounts we just made into the "accounts" folder, MAKE SURE emails.txt IS REMOVED!
Don't forget to copy the token.pickle and the credentials.json into the root of the rclone/autorclone (Not inside the credentials folder!!!)
[Image: 46lyO5t.png]

3. Open a terminal again (CMD) in that folder with rclone/autorclone
And type in
Code
pip install -U -r requirements.txt

4. We are now ready to start cloning/uploading

We use these 2 commands:

This to upload from pc to teamdrive:
Code
py rclone_sa_magic.py -sp YourLocalPath -d DestinationID -dp DestinationPathName -b 1 -e 100

And this to copy from public shared folder to teamdrive:
Code
py rclone_sa_magic.py -s SourceID -d DestinationID -dp DestinationPathName -b 1 -e 100

What you want to look at first is the -b 1 and -e 100 flags
If you only have 90 service accounts, change that value accordingly (-b1 -e 90)

7. Find the Destination ID

1. Next up, we need to find the destination ID.
Go to your teamdrive, and inside the teamdrive root you will find this
Spoiler (Click to View)
This is a teamdrive ID, you can use it for destination id

2.  For source ID, its the shared link ID
Make sure its set to "anyone with the link"
Spoiler (Click to View)

3. Your link will look something like this:
Code
https://drive[WARNING POSSIBLY INFECTED]google.com/drive/folders/1wNwX9glGbmKXX9XXXXXXXXXXXXXXXXXXXXXXXXXX?usp=sharing

The sourceID would be the the text after folders/ and before ?usp=sharing
Code
1wNwX9glGbmKXX9XXXXXXXXXXXXXXXXXXXXXXXXXX

Let's fill in the command now
Code
py rclone_sa_magic.py -s SourceID -d DestinationID -dp DestinationPathName -b 1 -e 100

Code
py rclone_sa_magic.py -s 1wNwX9glGbmKXX9XXXXXXXXXXXXXXXXXXXXXXXXXX -d 0AXXXXBz-XXXXXXXXX -dp cs-rin-ru -b 1 -e 100

And you're set, just press enter and it will start working!

4. Let's do the same for the uploading from your local pc to teamdrive
Code
py rclone_sa_magic.py -sp YourLocalPath -d DestinationID -dp DestinationPathName -b 1 -e 100

Code
py rclone_sa_magic.py -sp C:\Games\Torrents\Hackers.1995.REMASTERED.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT -d 0XXXXXBz-XXXXXXXXXX -dp cs-rin-ru -b 1 -e 100

8. Conclusion

That's it, you're set and it will start switching service accounts after each 735GB, so your limit now is 75TB a day.

[Image: BIOOqCS.png]
This tutorial is brought to you by the great group called Lions League.

Credits:
Hermietkreeft for the idea.

This tutorial is made for educational purposes. If you do anything illegal, I am not responsible for it. All the pictures in this tutorial are watermarked. If you share this tutorial on other websites, please make a credit.
[Image: 192-BC15-A-BC6-F-43-EA-8-ED4-76-D5-A5847950.gif]
Another techy TUT from Jinu will bookmark this one for future usage!
Bleh


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Elite_xApr 13, 2025 04:44 PM 4 571 Apr 13, 2025 04:44 PM
Last Post: SS2580G
by JinuJun 10, 2021 04:23 AM 9 405 Jun 10, 2021 04:23 AM
Last Post: Slopy
by pbhuvaneshSep 26, 2016 11:02 AM 24 1,963 Sep 26, 2016 11:02 AM
Last Post: xf0xalz