From c5e4605046b6f72c407cede1a3224beee96d3417 Mon Sep 17 00:00:00 2001 From: Breno Silva Date: Thu, 18 Apr 2013 23:05:24 -0400 Subject: [PATCH] Added Libjection tests --- tests/Makefile.am | 3 ++- tests/op/detectSQLi.t | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/op/detectSQLi.t diff --git a/tests/Makefile.am b/tests/Makefile.am index 2b2b6f46..c0209daa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,7 +21,8 @@ msc_test_SOURCES = msc_test.c \ $(top_srcdir)/apache2/msc_gsb.c \ $(top_srcdir)/apache2/acmp.c \ $(top_srcdir)/apache2/msc_lua.c \ - $(top_srcdir)/apache2/msc_release.c + $(top_srcdir)/apache2/msc_release.c \ + $(top_srcdir)/apache2/libinjection/sqlparse.c msc_test_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \ @PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @LUA_CFLAGS@ msc_test_CPPFLAGS = -I$(top_srcdir)/apache2 \ diff --git a/tests/op/detectSQLi.t b/tests/op/detectSQLi.t new file mode 100644 index 00000000..d7231057 --- /dev/null +++ b/tests/op/detectSQLi.t @@ -0,0 +1,18 @@ +{ + type => "op", + name => "issqli", + input => "", + ret => 0 +}, +{ + type => "op", + name => "issqli", + input => "this is not isqli", + ret => 0 +}, +{ + type => "op", + name => "issqli", + input => "ascii(substring(version() from 1 for 1))", + ret => 1 +}