From d79fae724ceb5ed61008a25a1c1c483297af15b7 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 24 Mar 2011 09:16:21 +0000 Subject: [PATCH] minor refactoring --- lib/core/common.py | 3 ++- lib/core/settings.py | 1 + lib/request/basic.py | 3 ++- lib/utils/hash.py | 7 ++++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 0c463a303..b2b645b54 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -80,6 +80,7 @@ from lib.core.settings import DUMP_DEL_MARKER from lib.core.settings import DUMP_TAB_MARKER from lib.core.settings import DUMP_START_MARKER from lib.core.settings import DUMP_STOP_MARKER +from lib.core.settings import LIST_EMAIL from lib.core.settings import MIN_TIME_RESPONSES from lib.core.settings import PAYLOAD_DELIMITER from lib.core.settings import REFLECTED_NON_ALPHA_NUM_REGEX @@ -2329,7 +2330,7 @@ def unhandledExceptionMessage(): errMsg = "unhandled exception in %s, retry your " % VERSION_STRING errMsg += "run with the latest development version from the Subversion " errMsg += "repository. If the exception persists, please send by e-mail " - errMsg += "to sqlmap-users@lists.sourceforge.net the following text " + errMsg += "to %s the following text " % LIST_EMAIL errMsg += "and any information required to reproduce the bug. The " errMsg += "developers will try to reproduce the bug, fix it accordingly " errMsg += "and get back to you.\n" diff --git a/lib/core/settings.py b/lib/core/settings.py index 4f215f0dd..844cb6300 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -22,6 +22,7 @@ REVISION = getRevisionNumber() VERSION_STRING = "sqlmap/%s" % VERSION DESCRIPTION = "automatic SQL injection and database takeover tool" SITE = "http://sqlmap.sourceforge.net" +LIST_EMAIL = "sqlmap-users@lists.sourceforge.net" # minimum distance of ratio from kb.matchRatio to result in True DIFF_TOLERANCE = 0.05 diff --git a/lib/request/basic.py b/lib/request/basic.py index 0cdf97073..315722d8d 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -24,6 +24,7 @@ from lib.core.common import sanitizeAsciiString from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger +from lib.core.settings import LIST_EMAIL from lib.core.settings import META_CHARSET_REGEX from lib.core.settings import DEFAULT_PAGE_ENCODING from lib.core.settings import UNICODE_ENCODING @@ -117,7 +118,7 @@ def checkCharEncoding(encoding): codecs.lookup(encoding) except LookupError: warnMsg = "unknown charset '%s'. " % encoding - warnMsg += "Please report by e-mail to sqlmap-users@lists.sourceforge.net." + warnMsg += "Please report by e-mail to %s." % LIST_EMAIL logger.warn(warnMsg) encoding = UNICODE_ENCODING diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 4f1bd75b8..07082dd69 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -36,6 +36,7 @@ from lib.core.enums import HASH from lib.core.exception import sqlmapUserQuitException from lib.core.settings import COMMON_PASSWORD_SUFFIXES from lib.core.settings import DUMMY_USER_PREFIX +from lib.core.settings import LIST_EMAIL from lib.core.settings import UNICODE_ENCODING def mysql_passwd(password, uppercase=True): @@ -400,7 +401,7 @@ def dictionaryAttack(attack_dict): except: warnMsg = "there was a problem while hashing entry: %s. " % repr(word) - warnMsg += "Please report by e-mail to sqlmap-users@lists.sourceforge.net." + warnMsg += "Please report by e-mail to %s." % LIST_EMAIL logger.critical(warnMsg) clearConsoleLine() @@ -449,14 +450,14 @@ def dictionaryAttack(attack_dict): except: warnMsg = "there was a problem while hashing entry: %s. " % repr(word) - warnMsg += "Please report by e-mail to sqlmap-users@lists.sourceforge.net." + warnMsg += "Please report by e-mail to %s." % LIST_EMAIL logger.critical(warnMsg) clearConsoleLine() if len(hash_regexes) == 0: warnMsg = "unknown hash Format. " - warnMsg += "Please report by e-mail to sqlmap-users@lists.sourceforge.net." + warnMsg += "Please report by e-mail to %s." % LIST_EMAIL logger.warn(warnMsg) if len(results) == 0: