Skip to content

t1maa/java-telegram-bot-sms-bomber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Telegram Bot SMS Bomber πŸ’£ (Java Library)

Very simple telegram bot that uses TelegramBots library. The bot has 26 services for sending sms.

Disclaimer

This material was taken from the public and provided for educational purposes only! I do not encourage you to repeat all the actions and I do not bear responsibility for this!

Telegram Bot API

This library use Telegram bot API, you can find more information following the link.

Bot app structure

Application architecture is designed using MVC pattern, which contains one model, nine controllers and one view.

java
β”œβ”€β”€ info.securedev.telegram.bot
β”‚Β Β  β”œβ”€β”€ controllers
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ CommandHandlerController
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ RouteController
β”‚   β”‚   β”œβ”€β”€ Command (interface)
β”‚   β”‚   β”œβ”€β”€ BaseCommandController (abstract class implements Command interface)
β”‚   β”‚   β”œβ”€β”€ StartCommandController (extends BaseCommandController)
β”‚   β”‚   β”œβ”€β”€ HelpCommandController (extends BaseCommandController)
β”‚   β”‚   β”œβ”€β”€ FloodDataCommandController (extends BaseCommandController)
β”‚   β”‚   β”œβ”€β”€ FloodStartCommandController (extends BaseCommandController)
β”‚   β”‚   β”œβ”€β”€ FloodCancelCommandController (extends BaseCommandController)
β”‚   β”‚   └── UnknownCommandController (extends BaseCommandController) 
β”‚Β Β  β”œβ”€β”€ models
β”‚Β Β  β”‚Β Β  └── Model
β”‚Β Β  β”œβ”€β”€ flood_services
β”‚Β Β  β”‚   β”œβ”€β”€ Flood (interface)
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ FloodService.Builder (implements Flood)
β”‚Β Β  β”‚Β Β  └── FloodServiceFactory
β”‚Β Β  β”œβ”€β”€ views
β”‚Β Β  β”‚Β Β  └── StartFlood
β”‚Β Β  β”œβ”€β”€ settings
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ BotConfig
β”‚Β Β  β”‚Β Β  └── RoutesContainer
β”‚Β Β  β”œβ”€β”€ utils
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Message.Builder
β”‚Β Β  β”‚Β Β  └── ...
β”‚   β”œβ”€β”€ MyBot
β”‚   └── Main
└── pom.xml
  • Controllers - CommandHandlerController and RouteController are base controllers, define which controller should be called next, depending on the input command. CommandHandlerController get command controllers from RouteController. RouteController get routes from RoutesContainer, which located in settings package. CommandΠ‘ontrollers (like StartCommandController) are responsible for base logics for proccesing the command, like send message, interact with model, view, etc. This is all designed by factory method pattern.
  • Model - contains ArrayLists of flood services and filtered input numbers.
  • View - get data from model and start flood.
  • Flood_services - FloodService.Builder class build objects for flood services, which send HTTP/HTTPS request with input numbers (Builder pattern). FloodServiceFactory class generate this objects and add in ArrayList.

Config

Before compile project you need to add the TelegramBots library to your project and create new bot with BotFather bot (if you don't have bot), set bot token, bot username and creater id (you can get with another bots) into BotConfig class, which located in settings package. And in this class you can turn on/of validation numbers for KZ format and change messages text, text in inline buttons, etc.

Result

Releases

No releases published

Packages

No packages published

Languages