added --beep (tested on Windows and Linux; for now turned off) switch

This commit is contained in:
Miroslav Stampar 2010-10-23 09:38:46 +00:00
parent c5fb4edf3e
commit 52f910f752
2 changed files with 5 additions and 1 deletions

View File

@ -81,7 +81,7 @@ def checkSqlInjection(place, parameter, value, parenthesis):
if not falseResult: if not falseResult:
infoMsg = "%s parameter '%s' is %s (%s) injectable " % (place, parameter, case.desc, logic) infoMsg = "%s parameter '%s' is %s (%s) injectable " % (place, parameter, case.desc, logic)
infoMsg += "with %d parenthesis" % parenthesis infoMsg += "with %d parenthesis%s" % (parenthesis, "\a" if conf.beep else "")
logger.info(infoMsg) logger.info(infoMsg)
return case.name return case.name

View File

@ -484,6 +484,10 @@ def cmdLineParser():
action="store_true", default=False, action="store_true", default=False,
help="Replicate dumped data into a sqlite3 database") help="Replicate dumped data into a sqlite3 database")
miscellaneous.add_option("--beep", dest="beep",
action="store_true", default=False,
help="Alert with audio beep when sql injection found")
# Hidden and/or experimental options # Hidden and/or experimental options
parser.add_option("--profile", dest="profile", action="store_true", parser.add_option("--profile", dest="profile", action="store_true",
default=False, help=SUPPRESS_HELP) default=False, help=SUPPRESS_HELP)