A Python tool for detecting SQL Injection vulnerabilities in web applications. Supports crawling to discover URLs and direct testing of specific targets. Part of my Python learning projects, similar to FilesOrganizer and Python-currency-converter-ksh.
- Introduction
- Features
- Installation
- Usage
- Examples
- Command-Line Arguments
- How It Works
- Limitations
- Contributing
- License
- Contact
SQL Injection (SQLi) is a critical vulnerability where attackers inject malicious SQL code into queries, potentially leading to data breaches. This scanner tests URLs by injecting vectors and checking for error patterns or time delays in responses.
Built for educational purposes, aligning with my GitHub repos focused on Python scripts for fun and practice. Use ethically—test only on authorized sites.
Disclaimer: Educational tool only. Unauthorized use may be illegal.
-
Modes:
- Crawling: BFS crawling to find and test URLs.
- Target Testing: Multi-threaded testing of URL lists.
-
SQLi Vectors: Includes error-based, boolean, time-based, and union payloads like
' OR '1'='1'--and1 UNION SELECT NULL,version(),NULL--. -
Detection: Checks for database error signatures (MySQL, PostgreSQL, Oracle) and time delays.
-
Threading & Customization: Adjustable threads, timeout, user-agent.
-
Output: Immediate terminal print (colored) and file append.
-
Banner & UI: ASCII banner, screen clear.
- Clone:
git clone https://github.com/Ian-Lusule/SQLi-Scanner.git
cd SQLi-Scanner- Dependencies:
pip install requests beautifulsoup4 colorama- Executable:
chmod +x sqli_scanner.pypython3 sqli_scanner.py [options]- Target Mode:
python3 sqli_scanner.py -Tt -f urls.txt -o vulnerable_sqli.txt- Crawling:
python3 sqli_scanner.py -d 3 -u http://testsite.com -o output.txt- Custom:
python3 sqli_scanner.py -Tt -f urls.txt -T 10 -a "CustomUA"- Modes:
-Tt,-d <depth> - Targets:
-u <URL>,-f <file> - Options:
-t <threads>,-T <timeout>,-a <UA>,-o <file>,-h
- Injection: Modifies query params with vectors.
- Check: Looks for errors or delays (>50% timeout).
- Crawling: Parses links, tests those with queries.
- Concurrency: ThreadPool for speed.
- GET Only: No POST or cookie injection.
- Blind SQLi: Basic time-based; may miss advanced cases.
- False Results: Needs manual confirmation.
- No Evasion: Basic vectors; sites with WAF may block.
- Ethical: Risk of detection/bans.
Fork, issue, PR welcome. Add vectors or improve detection.
MIT License.
- GitHub: Ian-Lusule
- See my other projects like Cs-Blogs for more.