zeratulus / php-sql-injection-filter
Simple SQL injection detection tool
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/zeratulus/php-sql-injection-filter
Requires
- php: ^8
- phpmyadmin/sql-parser: ^5.10
This package is auto-updated.
Last update: 2025-12-30 23:16:24 UTC
README
Currently under development
Installation
composer require zeratulus/php-sql-injection-filter
Usage example:
$result = (new Ninja\DB\SqlInjection())->init()->check($myStringToCheck);
Or more default OOP way:
$filter = new Ninja\DB\SqlInjection(); $filter->init(); $result = $filter->check($myStringToCheck);
Some comments:
Also you can use after call check(); method results of isSqlInjection();
To clean results of check use clearIssues();
Good example of usage is here: /tests/index.php
This solution was implemented to detect possible SQL injection at user input.
In search of solution for this purpose I google some info... but there were nothing for PHP.
Big thanks to Stuart Millar for Java implementation. Basic code were taken from here: https://github.com/stu17682/sql-injection-filter
Implemented with ChatGPT and Gemini.
With best regards Serhii Herenko