🦠VirusTotalTGBot👾 is a simple Telegram bot that uses the VirusTotal API to scan files and links. It provides detailed scan reports from over 70 antivirus services. The bot can be deployed on any server, making it ideal for checking suspicious files and links directly from your favorite messenger.
- 🔢 File and Link Scanning: Scan files (up to 20 MB) and links using the VirusTotal API.
- 👤 User ID Collecting: Receive a file containing the IDs of all users interacting with the bot.
- 🔒 Subscription Verification: Before using the bot, make sure that users are subscribed to the 4 specified channels.
- 🗨️ Blacklist Management: Add users to a blacklist to restrict their access.
- Java 11 is required to run the program. You can download it here.
- IntelliJ IDEA Community Edition is recommended for editing the source code. You can download it from the official site.
First, you need to create a bot using BotFather.
- Download the bot archive (e.g.,
VirusTotalTGBot-1.0.0-archive.tar.gz) and unpack it to a directory of your choice. - ️Open the directory in your terminal.
To use the bot, you will need your User ID and Channels IDs. Use this bot to get them:
- Forward a message from a channel to get its chat ID.
- Edit
config.jsonto update the required fields.
Before entering commands, you first need to become a ROOT. Enter sudo su on Linux or run cmd as an administrator
in Windows.
- TG_BOT_API: Your Telegram Bot API token. Obtain it from BotFather.
- TG_BOT_NAME: The name of your Telegram Bot (e.g.,
@BotName). - VT_API: Your VirusTotal API token. Register at VirusTotal to get it.
Use the following commands to set these variables for the current terminal session:
export TG_BOT_API="<Telegram Bot API Token>"
export TG_BOT_NAME="<Telegram Bot Name (@name)>"
export VT_API="<VirusTotal API Token>"set TG_BOT_API=<Telegram Bot API Token>
set TG_BOT_NAME=<Telegram Bot Name (@name)>
set VT_API=<VirusTotal API Token>To start the bot, run the following command:
java -cp "bin/<jar-archive-name>.jar:lib/*" com.MyDo.Program
java -cp "bin\<jar-archive-name>.jar;lib\*" com.MyDo.Program
If everything is configured correctly, you should see the following output:
<time> [main] INFO com.MyDo.Program - Bot started
Simply send a file or link to check for potential threats.
Limit: The file size should be up to 20 MB.
To access the panel, you must add your User ID to the admin-id field in config.json. Send /admin in chat to
open the Admin Panel, where you can:
- Download a file containing all user IDs.
- Toggle subscription checking for specified channels.
You can block multiple users by adding their IDs to config.json. Blacklisted users will be unable to use the bot until
their IDs are removed.
This feature is enabled by default but can be disabled in the Admin Panel.
To set it up properly:
- Update the URLs and IDs in the
chatssection ofconfig.json. - Add your bot as an administrator in the specified channels.
After completing these steps, the subscription check will work correctly.
Feel free to use, modify, and improve this project as you see fit. I welcome any changes or enhancements you wish to make.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.

