From c44978862e2b172577cc8148d445b2ca5e568380 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Sun, 6 Feb 2011 15:20:44 +0000 Subject: [PATCH] Minor reordering of what gets saved into the injection object --- lib/controller/checks.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 146178be6..fb1bb30ca 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -404,10 +404,19 @@ def checkSqlInjection(place, parameter, value): injection.suffix = suffix injection.clause = clause + # Feed with test details every time a test is successful + if hasattr(test, "details"): + for dKey, dValue in test.details.items(): + if dKey == "dbms": + injection.dbms = Backend.setDbms(dValue) + elif dKey == "dbms_version" and injection.dbms_version is None: + injection.dbms_version = Backend.setVersion(dValue) + elif dKey == "os" and injection.os is None: + injection.os = Backend.setOs(dValue) + if vector is None and "vector" in test and test.vector is not None: vector = "%s%s" % (test.vector, comment) - # Feed with test details every time a test is successful injection.data[stype] = advancedDict() injection.data[stype].title = title injection.data[stype].payload = agent.removePayloadDelimiters(reqPayload) @@ -421,15 +430,6 @@ def checkSqlInjection(place, parameter, value): injection.conf.string = conf.string injection.conf.regexp = conf.regexp - if hasattr(test, "details"): - for dKey, dValue in test.details.items(): - if dKey == "dbms": - injection.dbms = Backend.setDbms(dValue) - elif dKey == "dbms_version" and injection.dbms_version is None: - injection.dbms_version = Backend.setVersion(dValue) - elif dKey == "os" and injection.os is None: - injection.os = Backend.setOs(dValue) - if conf.beep or conf.realTest: beep()