A Telegram mirror bot which can be deployed using Heroku.

Overview

Slam

Slam Mirror Bot

This is a telegram bot writen in python for mirroring files on the internet to our beloved Google Drive.

Getting Google OAuth API credential file

  • Visit the Google Cloud Console
  • Go to the OAuth Consent tab, fill it, and save.
  • Go to the Credentials tab and click Create Credentials -> OAuth Client ID
  • Choose Desktop and Create.
  • Use the download button to download your credentials.
  • Clone this repo:
git clone https://github.com/breakdowns/slam-mirrorbot mirrorbot/
cd mirrorbot
  • Move that file to the root of mirrorbot, and rename it to credentials.json
  • Visit Google API page
  • Search for Drive and enable it if it is disabled
  • Finally, run the script to generate token file (token.pickle) for Google Drive:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py

Deployment

Fork this repo, than upload credentials.json and token.pickle to your forks

Deploy to Heroku

Features supported:

  • Mirroring direct download links to Google Drive
  • Mirroring Mega.nz links to Google Drive (In development stage)
  • Mirroring Uptobox.com links to Google Drive (Uptobox account must be premium)
  • Copy files from someone's drive to your drive (Using Autorclone)
  • Download/upload progress
  • Download/upload speeds and ETAs
  • Docker support
  • Uploading To Team Drives.
  • Index Link support
  • Service account support
  • Mirror all youtube-dl supported links
  • Mirror telegram files
  • Delete files from drive
  • Add stickers to your pack
  • Nyaa.si and Sukebei Torrent search
  • Shell and Executor
  • Index Link support
  • Shortener support
  • Custom Buttons
  • Speedtest with picture results
  • Extract these filetypes and uploads to google drive

ZIP, RAR, TAR, 7z, ISO, WIM, CAB, GZIP, BZIP2, APM, ARJ, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, LZH, LZMA, LZMA2, MBR, MSI, MSLZ, NSIS, NTFS, RPM, SquashFS, UDF, VHD, XAR, Z.

Using service accounts for uploading to avoid user rate limit

For Service Account to work, you must set USE_SERVICE_ACCOUNTS="True" in config file or environment variables Many thanks to AutoRClone for the scripts NOTE: Using service accounts is only recommended while uploading to a team drive.

Generate service accounts What is service account

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 sa 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. 

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

NOTE: If you have created SAs in past from this script, you can also just re download the keys by running:

python3 gen_sa_accounts.py --download-keys project_id

Add all the service accounts to the Team Drive

  • Run:
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:

machine host login username password my_youtube_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

Thanks to:

and many more people who aren't mentioned here, but may be found in Contributors.

Comments
  • bot: Change deploy method

    bot: Change deploy method

    • change deploy method to heroku container registry
    • for now, we no need HEROKU_EMAIL in github secrets
    • update credits

    Signed-off-by: GudMeong [email protected]

    opened by gudmeong 5
  • Undefined name: pe --> pw

    Undefined name: pe --> pw

    $ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

    ./slam-mirrorbot/bot/helper/mirror_utils/download_utils/direct_link_generator.py:351:39: F821 undefined name 'pe'
            req = requests.post(url, data=pe)
                                          ^
    1     F821 undefined name 'pe'
    1
    
    opened by cclauss 2
  • added proxy support

    added proxy support

    added proxy support for watch command (for personal use,might have to modify to make it usable)(im a noob) , you have to use /watch [youtube-dl supported link] [quality] |[CustomName] | [http://username:[email protected]:port/]

    other usable methods ex - http(s)://PROXY_URL:PROXY_PORT socks5://127.0.0.1:1080

    opened by eXtizi 2
  • Sourcery refactored master branch

    Sourcery refactored master branch

    Branch master refactored by Sourcery.

    If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Review changes via command line

    To manually merge these changes, make sure you're on the master branch, then run:

    git fetch origin sourcery/master
    git merge --ff-only FETCH_HEAD
    git reset HEAD^
    

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Sourcery refactored master branch

    Sourcery refactored master branch

    Branch master refactored by Sourcery.

    If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Review changes via command line

    To manually merge these changes, make sure you're on the master branch, then run:

    git fetch origin sourcery/master
    git merge --ff-only FETCH_HEAD
    git reset HEAD^
    

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
Releases(v5.2)
  • v5.2(Sep 22, 2021)

  • v5.1(Sep 4, 2021)

  • v5.0(Aug 7, 2021)

  • v4.8.7(Jun 19, 2021)

    • Tar/Unzip G-Drive Links Support
    • Fix overall download speed for Mega and others
    • Add shell custom command
    • Add Set Variable, Delete Variable, and Bot Info Menu (Only for Heroku)
    • Add Updater for update Bot from upstream
    • Torrent Search: Add 1337x, piratebay, tgx, yts, eztv, torlock, rarbg support

    NOTE: Please Redeploy

    Source code(tar.gz)
    Source code(zip)
  • v4.8.6(Jun 14, 2021)

    • direct_link_generator: add letsupload.io, feurl.com, pixeldrain.com support
    • Block Drive & YouTube link using /mirror command
    • Remove anime & stickers module, because not related in mirror bot
    • Some update in aria.sh
    • Tidying Up

    NOTE: Refroks & Redeploy Recommended.

    Source code(tar.gz)
    Source code(zip)
  • v4.8.4(Jun 8, 2021)

    • Added support for tar.xz
    • Fix Mega auto canceling if deleted file
    • Direct link generator: Addad Naniplay.com, Naniplay.nanime.in, Naniplay.nanime.biz, Sbembed.com, Streamsb.net support
    Source code(tar.gz)
    Source code(zip)
  • v4.8.3(Jun 5, 2021)

  • v4.8.2(Jun 4, 2021)

    • direct link generator: Added Hxfile, Anonfiles, Fembed (femax20 & layarkacaxxi), Onedrive (Only works for file not folder for now, thanks to UsergeTeam) support
    • aria: Added more tracker
    Source code(tar.gz)
    Source code(zip)
  • v4.8.1(May 31, 2021)

  • v4.8.0(May 30, 2021)

  • v4.7.6(May 18, 2021)

  • v4.7.5(May 17, 2021)

    • Added sudo using database NOTE: redeploy recommended to generating database, or you can go to your herokuapp > resources > add-ons > then serach Heroku Postgres > hit Submit Order Form. Done Database will automatic come in config vars
    • mirror: Fix for uploading telegram file_name of None type
    • gdriveTools: Fix infinite loop when hitting rate limits
    Source code(tar.gz)
    Source code(zip)
  • v4.6.9(Apr 26, 2021)

  • v4.6.6(Apr 18, 2021)

    • direct_links: Added racaty.net support
    • Update support group link
    • Fix Index URL encode problem
    • Added support for password protected index links by magneto
    Source code(tar.gz)
    Source code(zip)
  • v4.6.3(Apr 12, 2021)

  • v4.6.2(Apr 8, 2021)

  • v4.6(Mar 29, 2021)

  • v4.4(Mar 22, 2021)

  • v4.2(Mar 17, 2021)

  • v3.8(Mar 9, 2021)

  • v3.7(Mar 6, 2021)

  • v3.0(Mar 3, 2021)

    • Added auto generate Telegraph Token
    • Added Inline Buttons
    • Update /stats command
    • /list module will post search result on telegra.ph
    • Speedtest
    Source code(tar.gz)
    Source code(zip)
VC-Music , Playing music without bot.

VC-Userbot A Telegram Userbot to play or streaming Audio and Video songs / files in Telegram Voice Chats. It's made with PyTgCalls and Pyrogram Requir

RioProjectX 8 Aug 04, 2022
:lock: Python 2.7/3.X client for HashiCorp Vault

hvac HashiCorp Vault API client for Python 3.x Tested against the latest release, HEAD ref, and 3 previous minor versions (counting back from the late

hvac 1k Dec 29, 2022
A demo without 🚀 science, just simple UTXO spending logic.

Stuck TX Demo Docker container that runs 4 dogecoind to demonstrate "the stuck tx problem". Scenario A wallet sends out 3 transactions to a recipient

Patrick Lodder 2 Nov 16, 2021
Unofficial calendar integration with Gradescope

Gradescope-Calendar This script scrapes your Gradescope account for courses and assignment details. Assignment details currently can be transferred to

6 May 06, 2022
You cant check for conflicts until course enrolment actually opens. I wanted to do it earlier.

AcornICS I noticed that Acorn it does not let you check if a timetable is valid based on the enrollment cart, it also does not let you visualize it ea

Isidor Kaplan 2 Sep 16, 2021
A simple message content sniping Discord bot which you can run yourself! Sniping API pulled from isobot and Arch bot

Discord Snipe Bot This is a bot made with the same message content sniping API from isobot and Arch bot. It's default prefix is -, however you can als

notsniped 5 Aug 11, 2022
Amanda-A next gen powerful telegram group manager bot for manage your groups and have fun with other cool modules.

Amanda-A next gen powerful telegram group manager bot for manage your groups and have fun with other cool modules.

Team Amanda 4 Oct 21, 2022
Microservice to extract structured information on EVM smart contracts.

Contract Serializer Microservice to extract structured information on EVM smart contract. Why? Modern NFT contracts may have different names for getPr

WeBill.io 8 Dec 19, 2022
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

Amazon Web Services - Labs 1.9k Jan 07, 2023
Бот для мини-игры "Рабы" ("Рабство") ВКонтакте.

vk-slaves-bot Бот для мини-игры "Рабы" ("Рабство") ВК Группа в ВК, в ней публикуются новости и другая полезная информация. У группы есть беседа, в кот

Almaz 80 Dec 17, 2022
A fast, easy to set up telegram userbot running Python 3 which uses fork of the Telethon Library.

forked from friendly-telegram/friendly-telegram Friendly Telegram Userbot A fast, easy to set up telegram userbot running Python 3 which uses fork of

GeekTG 75 Jan 04, 2023
My attempt to reverse the Discord nitro token generation function.

discord-theory-I PART: I My attempt to reverse the Discord nitro token generation function. The Nitro generation tools thing is common in Discord now,

Jakom 29 Aug 14, 2022
The wrapper you need for the osu!api v2

oppy (op.py) oppy is the wrapper for use on the osu! v2 API. Version 1.0.0 Installation To install please use pip to install oppy pip install op.py To

Wayde 2 May 01, 2022
𝐀 𝐦𝐨𝐝𝐮𝐥𝐚𝐫 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐆𝐫𝐨𝐮𝐩 𝐦𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐛𝐨𝐭 𝐰𝐢𝐭𝐡 𝐮𝐥𝐭𝐢𝐦𝐚𝐭𝐞 𝐟𝐞𝐚𝐭𝐮𝐫𝐞𝐬 !!

𝐇𝐨𝐰 𝐓𝐨 𝐃𝐞𝐩𝐥𝐨𝐲 For easiest way to deploy this Bot click on the below button 𝐌𝐚𝐝𝐞 𝐁𝐲 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐆𝐫𝐨𝐮𝐩 𝐒𝐨𝐮𝐫𝐜𝐞𝐬 𝐆𝐞𝐧𝐞?

Mukesh Solanki 4 Oct 18, 2021
Data from popular CS:GO website hltv.org

Welcome to hltv-data 👋 🎮 Data from popular CS:GO website hltv.org Install pip install hltv-data Usage The public methods can be reached using HLTVCl

Dariusz Choruży 28 Dec 23, 2022
LHXP・Official "LH - Cyber Security" Discord Leveling-Bot

LHXP・Official "LH - Cyber Security" Discord Leveling-Bot Based on nsde/NOVΛLIX Feature Overview /clear @user Requires admin permission Purges all XP

Felix・onlix 2 Mar 09, 2022
Simple tool to gather domains from crt.sh using the organization name

Domain Collector: _ _ ___ _ _ _ __| | ___ _ __ ___ __ _(_)_ __ / __\___ | |

Cyber Guy 63 Dec 24, 2022
A Python wrapper around the Soundcloud API

soundcloud-python A friendly wrapper around the Soundcloud API. Installation To install soundcloud-python, simply: pip install soundcloud Or if you'r

SoundCloud 83 Dec 12, 2022
WhatsApp Web API client with multi-device support

Tauros WhatsApp Web client for multi-device in python Free software: MIT Documentation: https://tauros.readthedocs.io Features TODO Credits This packa

Manjit Pardeshi 0 Jan 20, 2022
Python Wrapper for handling payment requests through the Daraja MPESA API

Python Daraja Description Python Wrapper for handling payment requests through the Daraja MPESA API Contribution Refer to the CONTRIBUTING GUIDE. Usag

William Otieno 18 Dec 14, 2022