sqlinjection-detect
github路徑:
https://github.com/peter-cui1221/sqlinjection-detect
介紹
sqlinjection-detect(https://github.com/peter-cui1221/sqlinjection-detect)是一款用C語言實現的基於語義分析的SQL注入檢測引擎。
Simple example:
#include <stdio.h> #include <string.h> #include "sqli_detect.h" int main(int argc, char* argv[]) { char *str = "1' or '1'='1"; int ret = sqli_detect(str, strlen(str)); if (ret > 0) { printf("sqli found\n"); } return ret; }
vs libinjection
sqlinjection-detect是一款基於語義分析的SQL注冊檢測庫,能夠有效的提高檢出率,減少誤報。相比之下,libinjection(https://github.com/client9/libinjection) 是一款基於詞法分析SQL注入檢測庫。sqlinjection-detect和長亭的SQLChop(https://github.com/chaitin/sqlchop) 從功能的角度來看是一樣的。
usage
$ ./build.sh $ cmake . -DCMAKE_BUILD_TYPE=Release $ make $ gcc -I src/include/ sqli_test.c -o sqli_test -L. -lsqli_detect $ ./sqli_test $ sqli found
thanks
this project is base on https://github.com/winkyao/lemon