Skip to content

Commit

Permalink
Add index credentials built in code and some notes (breakdowns#124)
Browse files Browse the repository at this point in the history
* Add index credentials built in code and some notes

* fix
  • Loading branch information
anasty17 authored Jun 2, 2021
1 parent a392a03 commit 56bc6b3
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
COPY . .
COPY .netrc /root/.netrc
Run chmod 600 /usr/src/app/.netrc
RUN chmod +x aria.sh

CMD ["bash","start.sh"]
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,45 @@ Many thanks to [AutoRClone](https://github.com/xyou365/AutoRclone) for the scrip
Let us create only the Service Accounts that we need.
**Warning**: abuse of this feature is not the aim of this project and we do **NOT** recommend that you make a lot of projects, just one project and 100 SAs allow you plenty of use, its also possible that over abuse might get your projects banned by Google.

`Note: 1 Service Account can copy around 750gb a day, 1 project can make 100 Service Accounts so that's 75tb a day, for most users this should easily suffice. `
```
Note: 1 Service Account can copy around 750gb a day, 1 project can make 100 Service Accounts so that's 75tb a day, for most users this should easily suffice.
python3 gen_sa_accounts.py --quick-setup 1 --new-only
```
A folder named accounts will be created which will contain keys for the Service Accounts

`python3 gen_sa_accounts.py --quick-setup 1 --new-only`
OR you can create service accounts to current project, no need to create new one.

A folder named accounts will be created which will contain keys for the Service Accounts
1. List your projests ids
```
python3 gen_sa_accounts.py --list-projects
```
2. Enable services automatically by this cmd
```
python3 gen_sa_accounts.py --enable-services $PROJECTID
```
3. Create sevice accounts to current project
```
python3 gen_sa_accounts.py --create-sas $PROJECTID
```
4. Download sevice accounts as accounts folder
```
python3 gen_sa_accounts.py --download-keys $PROJECTID
```
If u want to add service accounts to google group so follow these steps also

5. Mount accounts folder
```
cd accounts
```
6. Grab emails form all accounts to emails.txt file that would be created in accounts folder
```
grep -oPh '"client_email": "\K[^"]+' *.json > emails.txt
```
7. Unmount acounts folder
```
cd -
```
Then add emails from emails.txt to google group, after that add google group to your shared drive and promote it to (manager).

**NOTE**: If you have created SAs in past from this script, you can also just re download the keys by running:
```
Expand All @@ -231,10 +263,14 @@ python3 add_to_team_drive.py -d SharedTeamDriveSrcID
```

# Youtube-dl authentication using .netrc file
For using your premium accounts in Youtube-dl, edit the netrc file according to following format:
For using your premium accounts in Youtube-dl or for protected index links, edit the netrc file according to following format:
```
machine host login username password my_youtube_password
```
For index link with only password without username, even http auth will not work, so this is the solution.
```
machine example.workers.dev password index_password
```
Where host is the name of extractor (eg. Youtube, Twitch). Multiple accounts of different hosts can be added each separated by a new line.

# Credits
Expand Down
2 changes: 1 addition & 1 deletion aria.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --check-certif
--disk-cache=64M --file-allocation=prealloc --continue=true \
--max-file-not-found=5 --max-tries=20 --auto-file-renaming=true \
--bt-enable-lpd=true --seed-time=0.01 --seed-ratio=1.0 \
--content-disposition-default-utf8=true --http-accept-gzip=true --reuse-uri=true
--content-disposition-default-utf8=true --http-accept-gzip=true --reuse-uri=true --netrc-path=/usr/src/app/.netrc
2 changes: 1 addition & 1 deletion config_sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _____REMOVE_THIS_LINE_____=True
BOT_TOKEN = ""
GDRIVE_FOLDER_ID = ""
OWNER_ID =
DOWNLOAD_DIR = "/home/slam/mirror-bot/downloads"
DOWNLOAD_DIR = "/usr/src/app/downloads"
DOWNLOAD_STATUS_UPDATE_INTERVAL = 5
AUTO_DELETE_MESSAGE_DURATION = 20
IS_TEAM_DRIVE = ""
Expand Down

0 comments on commit 56bc6b3

Please sign in to comment.