more code refactoring

This commit is contained in:
Miroslav Stampar
2010-11-23 14:50:47 +00:00
parent 3cae76627c
commit aa5d038f18
4 changed files with 532 additions and 13 deletions

View File

@@ -663,7 +663,8 @@ def setPaths():
paths.COMMON_TABLES = os.path.join(paths.SQLMAP_TXT_PATH, "common-tables.txt")
paths.COMMON_OUTPUTS = os.path.join(paths.SQLMAP_TXT_PATH, 'common-outputs.txt')
paths.SQL_KEYWORDS = os.path.join(paths.SQLMAP_TXT_PATH, "keywords.txt")
paths.WORDLIST_TXT = os.path.join(paths.SQLMAP_TXT_PATH, "wordlist.txt")
paths.ORACLE_DEFAULT_PASSWD = os.path.join(paths.SQLMAP_TXT_PATH, "oracle-default-passwords.txt")
paths.WORDLIST = os.path.join(paths.SQLMAP_TXT_PATH, "wordlist.txt")
paths.PHPIDS_RULES_XML = os.path.join(paths.SQLMAP_XML_PATH, "phpids_rules.xml")
paths.ERRORS_XML = os.path.join(paths.SQLMAP_XML_PATH, "errors.xml")
paths.INJECTIONS_XML = os.path.join(paths.SQLMAP_XML_PATH, "injections.xml")
@@ -1607,10 +1608,13 @@ def logHTTPTraffic(requestLogMsg, responseLogMsg):
kb.locks.reqLock.release()
def getPublicTypeMembers(type_):
"""
Useful for getting members from types (e.g. in enums)
"""
retVal = []
for name, value in getmembers(type_):
if not name.startswith('__'):
retVal.append((name, value))
return retVal
return retVal