From ecbbfeba6e88a5f3b545ac05f38143d74dbfde16 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 24 Mar 2011 10:08:47 +0000 Subject: [PATCH] introduction of --fresh-queries --- lib/core/optiondict.py | 1 + lib/parse/cmdline.py | 4 ++++ lib/utils/resume.py | 2 +- sqlmap.conf | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index ad12f8e4e..a1f2ececa 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -149,6 +149,7 @@ optDict = { "trafficFile": "string", "sessionFile": "string", "flushSession": "boolean", + "freshQueries": "boolean", "forms": "boolean", "eta": "boolean", "updateAll": "boolean", diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 15227de22..160710ca4 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -444,6 +444,10 @@ def cmdLineParser(): action="store_true", default=False, help="Flush session file for current target") + general.add_option("--fresh-queries", dest="freshQueries", + action="store_true", default=False, + help="Ignores query results stored in session file") + general.add_option("--eta", dest="eta", action="store_true", default=False, help="Display for each output the " diff --git a/lib/utils/resume.py b/lib/utils/resume.py index 099bf457a..9fdbe2c13 100644 --- a/lib/utils/resume.py +++ b/lib/utils/resume.py @@ -97,7 +97,7 @@ def resume(expression, payload): """ try: - if "sqlmapfile" in expression or "sqlmapoutput" in expression: + if "sqlmapfile" in expression or "sqlmapoutput" in expression or conf.freshQueries: return None condition = ( diff --git a/sqlmap.conf b/sqlmap.conf index 811f63ca0..fe646ae9c 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -484,6 +484,10 @@ sessionFile = # Valid: True or False flushSession = False +# Ignores query results stored in session file. +# Valid: True or False +freshQueries = False + # Retrieve each query output length and calculate the estimated time of # arrival in real time. # Valid: True or False