I haven't LOLed :))) so much for a long time:
(taken from 13 Sweet Family Photos..)
Damn Small SQLi Scanner (DSSS) has been made as a PoC (engl. abbr. Proof of Concept) where I wanted to show that commercial (SQLi) scanners can be beaten under 100 lines of code.
It supports blind/error SQLi tests, depth 1 crawling and advanced comparison of different attributes to distinguish blind responses (titles, HTTP status codes, filtered text only lengths and fuzzy comparison of contents itself). If you are satisfied with your commercial tool scanning results then I believe that you could even be more satisfied with this one.
Latest source code can be found here (update: current version is v0.2 - Nov 13th 2011).
p.s. update: as of v0.1f license has been changed from "GPLv2" to "Public domain (FREE)"p.p.s. sample run against LEGAL deliberately vulnerable page from Acunetix:
$ python dsss.py -u "http://testphp.vulnweb.com/artists.php?artist=1"
Damn Small SQLi Scanner (DSSS) < 100 LOC (Lines of Code) #v0.1i
by: Miroslav Stampar (http://unconciousmind.blogspot.com | @stamparm)
* crawling for links at the given target url
* scanning: http://testphp.vulnweb.com/artists.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/guestbook.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/categories.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/style.css (no GET parameters)
* scanning: http://testphp.vulnweb.com/login.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/privacy.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/cart.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/userinfo.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/disclaimer.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/artists.php?artist=1
(o) parameter 'artist' could be error SQLi vulnerable! (MySQL error message)
(i) parameter 'artist' appears to be blind SQLi vulnerable! ("http://testphp.vu
lnweb.com/artists.php?artist=1 AND 101=101")
* scanning: http://testphp.vulnweb.com/AJAX/index.php (no GET parameters)
* scanning: http://testphp.vulnweb.com/index.php (no GET parameters)
scan results: possible vulnerabilities found
p.p.p.s. ttyrec console recording:
"mysql_" inside the code and learn from their practice. I won't claim that they are all free of SQLi but I can guarantee you that those at the top are doing a fine job protecting against this kind of threat(s)