SecureXTools is a powerful, feature-rich Telegram bot designed to provide tools for media downloading, IP and proxy checking, website screenshots, and administrative controls. It supports deployment on multiple platforms, including VPS, Heroku, and Docker, with compatibility for Ubuntu, Windows, RDP, and Debian hosting.
Project Owner: @ISmartDevs
Repository: GitHub - SecureXTools
Community: Join our Telegram Channel for updates and support 📢.
SecureXTools Bot offers the following commands and functionalities:
- /start: Initialize the SecureXTools Bot.
- /help: Display the help menu and list of available commands.
- /info: Retrieve user information from the database.
- /id: Get group or channel information.
- /ip: Fetch details about any IP address.
- /px: Check proxies of any type (up to a limit of 20).
- /ss: Capture a screenshot of any website.
- /fb: Download videos from Facebook.
- /in: Download Instagram reels and posts.
- /sp: Download tracks from Spotify.
- /song: Download music from YouTube.
- /video: Download videos from YouTube.
- /tt: Download TikTok videos.
- /pnt: Download Pinterest videos.
- /settings: Modify bot variables (Admin only).
- /auth: Promote a user to sudo status (Admin only).
- /unauth: Demote a user from sudo status (Admin only).
- /gban: Ban a user from using the bot (Admin only).
- /gunban: Unban a user from using the bot (Admin only).
- /logs: Retrieve bot console logs (Admin only).
- /restart: Restart the bot (Admin only).
- /speedtest: Check the bot server’s speed (Admin only).
- /send: Broadcast messages to users (Admin only).
- /stats: View bot usage statistics (Admin only).
- /broadcast: Broadcast messages to users using (Admin only).
- /stats: View bot usage statistics (Admin only).
- /off: Turn Entire Bot Off (Admin only).
Before deploying SecureXTools Bot, ensure the following dependencies are installed:
- Python 3.8+: Required for running the bot.
- FFmpeg: Necessary for media processing.
- For Ubuntu/Debian:
sudo apt update sudo apt install ffmpeg
- Note: FFmpeg cannot be installed via
pip
. Use your system’s package manager.
- For Ubuntu/Debian:
- Python Dependencies:
- Install required Python packages:
pip3 install -r requirements.txt
- Install required Python packages:
The following environment variables must be set for the bot to function correctly:
Variable | Description | Example Value |
---|---|---|
API_ID |
Telegram API ID from my.telegram.org. | Your_API_ID_Here |
API_HASH |
Telegram API Hash from my.telegram.org. | Your_API_HASH_Here |
BOT_TOKEN |
Bot token from @BotFather. | Your_BOT_TOKEN_Here |
BOT_USERNAME |
Bot’s Telegram username. | @YourBotUsername |
BOT_NAME |
Bot’s display name. | YourBotName |
OWNER_ID |
Telegram ID of the bot owner. | Your_OWNER_ID_Here |
DEVELOPER_USER_ID |
Telegram ID of the developer (usually same as OWNER_ID). | Your_DEVELOPER_USER_ID_Here |
MONGO_URL |
MongoDB connection URL. | Your_MONGO_URL_Here |
DATABASE_URL |
Same as MONGO_URL for database operations. |
Your_DATABASE_URL_Here |
The following variables are optional and have default values if not set:
Variable | Description | Default Value |
---|---|---|
COMMAND_PREFIX |
Prefixes for bot commands. | `! |
UPDATE_CHANNEL_URL |
Telegram channel for updates. | https://t.me/TheSmartDev |
IMGAI_SIZE_LIMIT |
Max file size for image AI tools (bytes). | 5242880 |
MAX_TXT_SIZE |
Max text file size (bytes). | 15728640 |
MAX_VIDEO_SIZE |
Max video file size (bytes). | 2147483648 |
YT_COOKIES_PATH |
Path to YouTube cookies file. | ./cookies/SecureXTools.txt |
VIDEO_RESOLUTION |
Resolution for YouTube downloads. | 1280x720 |
PROXY_CHECK_LIMIT |
Max number of proxies to check. | 20 |
SecureXTools Bot supports multiple deployment methods: VPS, Heroku, and Docker. Follow the instructions below for your preferred platform.
Screen allows you to run the bot in a persistent session, even after closing your terminal.
-
For Ubuntu/Debian:
sudo apt update sudo apt install screen
-
Start a new screen session:
screen -S SecureXTools
-
Clone the repository:
git clone https://github.com/TheSmartDevs/SecureXTools.git cd SecureXTools
-
Install dependencies:
sudo apt install ffmpeg pip3 install -r requirements.txt
-
Set up environment variables:
- Create a
.env
file in the project root and populate it with the variables listed above. - Alternatively, edit
config.py
directly with your values Orcp sample.env .env
- Create a
-
Run the bot:
python3 main.py
-
Detach from the screen session:
- Press
Ctrl+A
, thenCtrl+D
to detach. - To reattach later:
screen -r SecureXTools
- Press
-
Stop the bot:
- Reattach to the screen session (
screen -r SecureXTools
). - Press
Ctrl+C
to stop the bot.
- Reattach to the screen session (
For a quick deployment, use the Heroku Deploy button:
-
Clone the repository:
git clone https://github.com/TheSmartDevs/SecureXTools.git cd SecureXTools
-
Create a Heroku app:
heroku create your-app-name
-
Set environment variables:
- Use the Heroku dashboard or CLI to set the required variables:
heroku config:set API_ID=Your_API_ID_Here heroku config:set API_HASH=Your_API_HASH_Here heroku config:set BOT_TOKEN=Your_BOT_TOKEN_Here # Add other variables as needed
- Use the Heroku dashboard or CLI to set the required variables:
-
Deploy the app:
git push heroku main
-
Start the bot:
heroku ps:scale worker=1
-
Install FFmpeg on Heroku:
- Add the FFmpeg buildpack:
heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
- Add the FFmpeg buildpack:
- Install Docker and Docker Compose.
-
Clone the repository:
git clone https://github.com/TheSmartDevs/SecureXTools.git cd SecureXTools
-
Create a
.env
file in the project root with the required environment variables. -
Build and run the bot:
docker compose up --build --remove-orphans
-
Stop the bot:
docker compose down
- First Open Bot Father:
- First Go To @BotFather Then Paste The Commands By Coping From Cutting From
cmds.txt
File.
- First Go To @BotFather Then Paste The Commands By Coping From Cutting From
- Easiest Way With Sudo Mode:
- Just Send /set Command To Your Hosted Bot And Then Commands Will Auto Set If You Are Owner Of The Bot Or Your UserID Is In
OWNER_ID
VAR.
- Just Send /set Command To Your Hosted Bot And Then Commands Will Auto Set If You Are Owner Of The Bot Or Your UserID Is In
To avoid YouTube sign-in or bot protection errors, use a cookie file for authentication. Follow these steps:
-
Create a Dedicated Chrome Profile:
- Set up a new Chrome profile for the bot to manage cookies securely.
-
Install a Cookie Management Extension:
- Use an extension like Cookie Editor to export cookies.
-
Export Cookies from YouTube:
- Log into YouTube using the dedicated Chrome profile.
- Use the cookie extension to export cookies in Netscape format.
-
Save the Cookies File:
- Save the exported cookies as
SecureXTools.txt
in the./cookies/SecureXTools.txt
directory.
- Save the exported cookies as
- Cookie Expiry: YouTube cookies may expire. If downloads fail, export and replace the cookies file.
- Avoid Cookie Depletion:
- Do not play YouTube videos on the account used for cookies.
- Avoid signing out from the associated Gmail account on your device.
- Minimize frequent bot restarts to prevent cookie invalidation.
- Monitor Cookies: Regularly check bot activity to ensure cookies remain valid.
This setup ensures reliable access to YouTube content without sign-in or bot protection errors.
We welcome contributions to improve SecureXTools Bot. To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a clear description of your changes.
Please ensure your code follows the project’s coding standards and includes appropriate documentation.
For issues, questions, or feature requests:
- Join our Telegram Channel for community support.
- Contact the project owner: @ISmartDevs.
- Open an issue on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.
SecureXTools Bot is a project by @ISmartDevs. Built for the Telegram community.
Simply modifying a few lines of code does not constitute original authorship. When forking this project, always:
- Fork responsibly and give proper credit to the original creators (@ISmartDevs).
- Customize the code as needed, but do not claim it as your own without significant contributions.