This repository contains a Telegram bot that simulates a SQL injection vulnerability in a voting system. This project is intended for educational purposes only to demonstrate SQL injection risks in Python applications. Do not use this bot in production or against real users.
- Vote for candidates via Telegram messages
- Stores votes in a SQLite database
- Admin management
- Demonstrates how unsanitized SQL queries can be exploited
- View current voting results
- Clone the repository:
git clone https://github.com/e1l1ya/telegram-bot-sqli-simulation.git
cd telegram-bot-sqli-simulation- Create a virtual environment:
python -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt-
Set your Telegram bot token in the code (
TOKENvariable inmain.pyline 6). -
Run the bot:
python main.py- Start the bot by sending
/startin Telegram. - Vote for a candidate by selecting a button.
- View results by sending
/result.
- This bot intentionally contains unsafe SQL queries to simulate SQL injection.
- This project is for learning purposes only. Do not use it for real attacks.
- All user votes are stored in
votes.db.
Follow HackMeLocal on Telegram for more educational security content.
This project is licensed under the MIT License.