-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 25b345e
Showing
87 changed files
with
13,444 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Manually Deploy to Heroku | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: akhileshns/[email protected] | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: ${{secrets.HEROKU_APP_NAME}} | ||
heroku_email: ${{secrets.HEROKU_EMAIL}} | ||
usedocker: true | ||
docker_heroku_process_type: web | ||
stack: "container" | ||
region: "us" | ||
env: | ||
HD_CONFIG_FILE_URL: ${{secrets.CONFIG_FILE_URL}} | ||
HD_HEROKU_API_KEY: ${{secrets.HEROKU_API_KEY}} | ||
HD_HEROKU_APP_NAME: ${{secrets.HEROKU_APP_NAME}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
config.env | ||
Thumbnails/* | ||
drive_folder | ||
cookies.txt | ||
*auth_token.txt | ||
*.pyc | ||
data* | ||
.vscode | ||
.idea | ||
*.json | ||
*.pickle | ||
.netrc | ||
log.txt | ||
authorized_chats.txt | ||
sudo_users.txt | ||
accounts/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM anasty17/mltb:latest | ||
|
||
WORKDIR /usr/src/app | ||
RUN chmod 777 /usr/src/app | ||
|
||
COPY requirements.txt . | ||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
RUN apt-get update && apt-get upgrade -y | ||
RUN apt -qq update --fix-missing && \ | ||
apt -qq install -y \ | ||
mediainfo | ||
|
||
COPY . . | ||
|
||
CMD ["bash", "start.sh"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<p align="center"> | ||
<a href="https://github.com/weebzone/WZML"> | ||
<kbd> | ||
<img width="250" src="https://telegra.ph/file/496644cbabaeb916e3616.png" alt="WeebZone Logo"> | ||
</kbd> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
<div align=center> | ||
|
||
[![GitHub forks](https://img.shields.io/github/forks/weebzone/WZML?style=social)](https://github.com/weebzone/WZML/fork) | ||
[![GitHub followers](https://img.shields.io/github/followers/weebzone?style=social&label=weebzone%20Followers)](https://github.com/weebzone) | ||
|
||
---- | ||
|
||
[![](https://img.shields.io/github/repo-size/weebzone/WZML?color=green&label=Repo%20Size&labelColor=292c3b)](#) [![](https://img.shields.io/github/commit-activity/m/weebzone/WZML?logo=github&labelColor=292c3b&label=Github%20Commits)](#) [![](https://img.shields.io/github/license/weebzone/WZML?style=flat&label=License&labelColor=292c3b)](#)|[![](https://img.shields.io/github/issues-raw/weebzone/WZML?style=flat&label=Open%20Issues&labelColor=292c3b)](#) [![](https://img.shields.io/github/issues-closed-raw/weebzone/WZML?style=flat&label=Closed%20Issues&labelColor=292c3b)](#) [![](https://img.shields.io/github/issues-pr-raw/weebzone/WZML?style=flat&label=Open%20Pull%20Requests&labelColor=292c3b)](#) [![](https://img.shields.io/github/issues-pr-closed-raw/weebzone/WZML?style=flat&label=Closed%20Pull%20Requests&labelColor=292c3b)](#) | ||
:---:|:---:| | ||
[![](https://img.shields.io/github/languages/count/weebzone/WZML?style=flat&label=Total%20Languages&labelColor=292c3b&color=blueviolet)](#) [![](https://img.shields.io/github/languages/top/weebzone/WZML?style=flat&logo=python&labelColor=292c3b)](#) [![](https://img.shields.io/github/last-commit/weebzone/WZML?style=flat&label=Last%20Commit&labelColor=292c3b&color=important)](#) [![](https://badgen.net/github/branches/weebzone/WZML?label=Total%20Branches&labelColor=292c3b)](#)|[![](https://img.shields.io/github/forks/weebzone/WZML?style=flat&logo=github&label=Forks&labelColor=292c3b&color=critical)](#) [![](https://img.shields.io/github/stars/weebzone/WZML?style=flat&logo=github&label=Stars&labelColor=292c3b&color=yellow)](#) [![](https://badgen.net/docker/pulls/codewithweeb/weebzone?icon=docker&label=Pulls&labelColor=292c3b&color=blue)](#) | ||
[![](https://img.shields.io/badge/Telegram%20Channel-Join-9cf?style=for-the-badge&logo=telegram&logoColor=blue&style=flat&labelColor=292c3b)](https://t.me/WeebZone_updates) |[![](https://img.shields.io/badge/Support%20Group-Join-9cf?style=for-the-badge&logo=telegram&logoColor=blue&style=flat&labelColor=292c3b)](https://t.me/WeebZ) | | ||
|
||
</div> | ||
|
||
---- | ||
|
||
## ***WeebZone MLTB*** | ||
|
||
<div align=center> | ||
|
||
ℹ️ A Powerful Pyrogram Based Telegram Mirror Leech Bot Modded by Codewithweeb to directly Mirror to Google Drive or Leech to Telegram, with Multi Direct Links Support for Enhanced Mirroring & Leeching.| | ||
---| | ||
|
||
### ***Source Code*** : [Repo](https://github.com/weebzone/WZML) | ||
|
||
#### Note: `If you Like My Work, Give Stars ⭐ to the Repo and Follow Me on Github` | ||
|
||
---- | ||
</div> | ||
</p> | ||
|
||
### 1. [***Getting Started***](https://github.com/weebzone/WZML/wiki/Getting-Started) | ||
Introduction To the Bot | ||
|
||
### 2. [***Features***](https://github.com/weebzone/WZML/wiki/Features) | ||
List of features supported by bot | ||
|
||
### 3. [***config.env Variables***](https://github.com/weebzone/WZML/wiki/Setting-up-the-config.env-file) | ||
List of Variables used by the Bot | ||
|
||
### 4. [***Deploy***](https://github.com/weebzone/WZML/wiki/Deployment) | ||
Steps to Deploy the Bot to Run for Yourself | ||
|
||
--- | ||
|
||
## License ⚠️ | ||
|
||
[![](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://www.gnu.org/licenses/gpl-3.0.html) | ||
|
||
```text | ||
Copyright (C) 2022 WeebZone | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. < https://github.com/weebzone/WZML/blob/update/LICENSE >. | ||
``` | ||
|
||
--- | ||
|
||
## Contributors 🏆 | ||
<details> | ||
<summary><b>Click Here For Description</b></summary> | ||
|
||
|![](https://avatars.githubusercontent.com/u/113664541)|![](https://avatars.githubusercontent.com/u/77075674)|![](https://avatars.githubusercontent.com/u/94453305)|![](https://avatars.githubusercontent.com/u/56303690)|![](https://avatars.githubusercontent.com/u/91935990)|![](https://avatars.githubusercontent.com/u/80155750)| | ||
|---|---|---|---|---|---| | ||
|[`CodeWithWeeb`](https://github.com/weebzone)|[`Anasty17`](https://github.com/anasty17)|[`Ajay Choudhary`](https://github.com/ajay0916) |[`Arshsisodiya`](https://github.com/arshsisodiya/helios-mirror) |[`ToxyTech`](https://github.com/dipeshpatil123)|[`MysterySD`](https://github.com/5MysterySD)| | ||
| `me` add modules and fixes & many more|Base Repo|For suggestion & fixing| For there BOT_PM and LOG feature| For Task Limit| For Help and PIXIBAY Support| | ||
|
||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-time-machine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
from __future__ import print_function | ||
from google.oauth2.service_account import Credentials | ||
import googleapiclient.discovery, json, progress.bar, glob, sys, argparse, time | ||
from google_auth_oauthlib.flow import InstalledAppFlow | ||
from google.auth.transport.requests import Request | ||
import os, pickle | ||
|
||
stt = time.time() | ||
|
||
parse = argparse.ArgumentParser( | ||
description='A tool to add service accounts to a shared drive from a folder containing credential files.') | ||
parse.add_argument('--path', '-p', default='accounts', | ||
help='Specify an alternative path to the service accounts folder.') | ||
parse.add_argument('--credentials', '-c', default='./credentials.json', | ||
help='Specify the relative path for the credentials file.') | ||
parse.add_argument('--yes', '-y', default=False, action='store_true', help='Skips the sanity prompt.') | ||
parsereq = parse.add_argument_group('required arguments') | ||
parsereq.add_argument('--drive-id', '-d', help='The ID of the Shared Drive.', required=True) | ||
|
||
args = parse.parse_args() | ||
acc_dir = args.path | ||
did = args.drive_id | ||
credentials = glob.glob(args.credentials) | ||
|
||
try: | ||
open(credentials[0], 'r') | ||
print('>> Found credentials.') | ||
except IndexError: | ||
print('>> No credentials found.') | ||
sys.exit(0) | ||
|
||
if not args.yes: | ||
# input('Make sure the following client id is added to the shared drive as Manager:\n' + json.loads((open( | ||
# credentials[0],'r').read()))['installed']['client_id']) | ||
input('>> Make sure the **Google account** that has generated credentials.json\n is added into your Team Drive ' | ||
'(shared drive) as Manager\n>> (Press any key to continue)') | ||
|
||
creds = None | ||
if os.path.exists('token_sa.pickle'): | ||
with open('token_sa.pickle', 'rb') as token: | ||
creds = pickle.load(token) | ||
# If there are no (valid) credentials available, let the user log in. | ||
if not creds or not creds.valid: | ||
if creds and creds.expired and creds.refresh_token: | ||
creds.refresh(Request()) | ||
else: | ||
flow = InstalledAppFlow.from_client_secrets_file(credentials[0], scopes=[ | ||
'https://www.googleapis.com/auth/admin.directory.group', | ||
'https://www.googleapis.com/auth/admin.directory.group.member' | ||
]) | ||
# creds = flow.run_local_server(port=0) | ||
creds = flow.run_console() | ||
# Save the credentials for the next run | ||
with open('token_sa.pickle', 'wb') as token: | ||
pickle.dump(creds, token) | ||
|
||
drive = googleapiclient.discovery.build("drive", "v3", credentials=creds) | ||
batch = drive.new_batch_http_request() | ||
|
||
aa = glob.glob('%s/*.json' % acc_dir) | ||
pbar = progress.bar.Bar("Readying accounts", max=len(aa)) | ||
for i in aa: | ||
ce = json.loads(open(i, 'r').read())['client_email'] | ||
batch.add(drive.permissions().create(fileId=did, supportsAllDrives=True, body={ | ||
"role": "organizer", | ||
"type": "user", | ||
"emailAddress": ce | ||
})) | ||
pbar.next() | ||
pbar.finish() | ||
print('Adding...') | ||
batch.execute() | ||
|
||
print('Complete.') | ||
hours, rem = divmod((time.time() - stt), 3600) | ||
minutes, sec = divmod(rem, 60) | ||
print("Elapsed Time:\n{:0>2}:{:0>2}:{:05.2f}".format(int(hours), int(minutes), sec)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if [ -z $TORRENT_TIMEOUT ] | ||
then | ||
TORRENT_TIMEOUT=0 | ||
fi | ||
tracker_list=$(curl -Ns https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/all.txt https://ngosang.github.io/trackerslist/trackers_all_http.txt https://newtrackon.com/api/all https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_tracker.txt | awk '$0' | tr '\n\n' ',') | ||
aria2c --allow-overwrite=true --auto-file-renaming=true --bt-enable-lpd=true --bt-detach-seed-only=true \ | ||
--bt-remove-unselected-file=true --bt-stop-timeout=$TORRENT_TIMEOUT --bt-tracker="[$tracker_list]" \ | ||
--check-certificate=false --check-integrity=true --continue=true --content-disposition-default-utf8=true \ | ||
--daemon=true --disk-cache=40M --enable-rpc=true --follow-torrent=mem --force-save=true --http-accept-gzip=true \ | ||
--max-connection-per-server=10 --max-concurrent-downloads=10 --max-file-not-found=0 --max-tries=20 \ | ||
--min-split-size=10M --netrc-path=/usr/src/app/.netrc --optimize-concurrent-downloads=true \ | ||
--peer-id-prefix=-qB4430- --peer-agent=qBittorrent/4.4.3 --quiet=true --reuse-uri=true \ | ||
--rpc-max-request-size=1024M --seed-ratio=0 --split=10 --summary-interval=0 --user-agent=Wget/1.12 |
Oops, something went wrong.