From c1a14257a4e48f1e72207358be887fbfdfa65986 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 16 Jul 2012 11:31:51 +0200 Subject: [PATCH] Removing --disable... switches and making changes in default choice(s) for respectable sections --- lib/core/optiondict.py | 2 -- lib/parse/cmdline.py | 8 -------- lib/utils/hash.py | 2 +- plugins/generic/enumeration.py | 6 ++---- plugins/generic/misc.py | 6 +++--- sqlmap.conf | 8 -------- 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index fbedd93cb..6c30d46a6 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -190,8 +190,6 @@ optDict = { "checkPayload": "boolean", "cleanup": "boolean", "dependencies": "boolean", - "disableHash": "boolean", - "disableLike": "boolean", "googlePage": "integer", "mobile": "boolean", "pageRank": "boolean", diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index d55d41d06..9ff2f4bb4 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -610,14 +610,6 @@ def cmdLineParser(): action="store_true", help="Check for missing sqlmap dependencies") - miscellaneous.add_option("--disable-hash", dest="disableHash", - action="store_true", - help="Disable password hash cracking mechanism") - - miscellaneous.add_option("--disable-like", dest="disableLike", - action="store_true", - help="Disable LIKE search of identificator names") - miscellaneous.add_option("--gpage", dest="googlePage", type="int", help="Use Google dork results from specified page number") diff --git a/lib/utils/hash.py b/lib/utils/hash.py index d47fa809b..00e98e4c0 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -362,7 +362,7 @@ def attackDumpedTable(): if attack_dict: message = "recognized possible password hashes in column%s " % ("s" if len(col_passwords) > 1 else "") message += "'%s'. Do you want to " % ", ".join(col for col in col_passwords) - message += "crack them via a dictionary-based attack? [Y/n/q]" + message += "crack them via a dictionary-based attack? [y/N/q]" test = readInput(message, default="Y") if test[0] in ("n", "N"): diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index bd1a64ca9..9f15f2137 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1073,7 +1073,7 @@ class Enumeration: logger.error(errMsg) bruteForce = True - if bruteForce or colList and conf.disableLike: + if bruteForce or colList: resumeAvailable = False for tbl in tblList: @@ -1785,9 +1785,7 @@ class Enumeration: kb.data.dumpedTable["__infos__"] = {"count": entriesCount, "table": safeSQLIdentificatorNaming(tbl, True), "db": safeSQLIdentificatorNaming(conf.db)} - if not conf.disableHash: - attackDumpedTable() - + attackDumpedTable() conf.dumper.dbTableValues(kb.data.dumpedTable) except sqlmapConnectionException, e: diff --git a/plugins/generic/misc.py b/plugins/generic/misc.py index e2851e894..5bf55ea14 100644 --- a/plugins/generic/misc.py +++ b/plugins/generic/misc.py @@ -176,10 +176,10 @@ class Miscellaneous: def likeOrExact(self, what): message = "do you want sqlmap to consider provided %s(s):\n" % what - message += "[1] as LIKE %s names (default)\n" % what - message += "[2] as exact %s names" % what + message += "[1] as LIKE %s names\n" % what + message += "[2] as exact %s names (default)" % what - choice = readInput(message, default='1') if not conf.disableLike else '2' + choice = readInput(message, default='2') if not choice or choice == '1': choice = '1' diff --git a/sqlmap.conf b/sqlmap.conf index 82c02cc30..ea5810933 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -651,14 +651,6 @@ cleanup = False # Valid: True or False dependencies = False -# Disable password hash cracking mechanism. -# Valid: True or False -disableHash = False - -# Disable LIKE search of identificator names. -# Valid: True or False -disableLike = False - # Use Google dork results from specified page number. # Valid: integer # Default: 1