mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Minor style update
This commit is contained in:
parent
6ade007aec
commit
3c81f74823
|
@ -503,10 +503,10 @@ class Dump:
|
||||||
if tbl in _[db]:
|
if tbl in _[db]:
|
||||||
_[db][tbl][col] = dataType
|
_[db][tbl][col] = dataType
|
||||||
else:
|
else:
|
||||||
_[db][tbl] = { col: dataType }
|
_[db][tbl] = {col: dataType}
|
||||||
else:
|
else:
|
||||||
_[db] = {}
|
_[db] = {}
|
||||||
_[db][tbl] = { col: dataType }
|
_[db][tbl] = {col: dataType}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,8 @@ DBMS_DIRECTORY_DICT = dict((getattr(DBMS, _), getattr(DBMS_DIRECTORY_NAME, _)) f
|
||||||
SUPPORTED_DBMS = MSSQL_ALIASES + MYSQL_ALIASES + PGSQL_ALIASES + ORACLE_ALIASES + SQLITE_ALIASES + ACCESS_ALIASES + FIREBIRD_ALIASES + MAXDB_ALIASES + SYBASE_ALIASES + DB2_ALIASES
|
SUPPORTED_DBMS = MSSQL_ALIASES + MYSQL_ALIASES + PGSQL_ALIASES + ORACLE_ALIASES + SQLITE_ALIASES + ACCESS_ALIASES + FIREBIRD_ALIASES + MAXDB_ALIASES + SYBASE_ALIASES + DB2_ALIASES
|
||||||
SUPPORTED_OS = ( "linux", "windows" )
|
SUPPORTED_OS = ( "linux", "windows" )
|
||||||
|
|
||||||
DBMS_DICT = { DBMS.MSSQL: (MSSQL_ALIASES, "python-pymssql", "http://pymssql.sourceforge.net/"),
|
DBMS_DICT = {
|
||||||
|
DBMS.MSSQL: (MSSQL_ALIASES, "python-pymssql", "http://pymssql.sourceforge.net/"),
|
||||||
DBMS.MYSQL: (MYSQL_ALIASES, "python pymysql", "http://code.google.com/p/pymysql/"),
|
DBMS.MYSQL: (MYSQL_ALIASES, "python pymysql", "http://code.google.com/p/pymysql/"),
|
||||||
DBMS.PGSQL: (PGSQL_ALIASES, "python-psycopg2", "http://initd.org/psycopg/"),
|
DBMS.PGSQL: (PGSQL_ALIASES, "python-psycopg2", "http://initd.org/psycopg/"),
|
||||||
DBMS.ORACLE: (ORACLE_ALIASES, "python cx_Oracle", "http://cx-oracle.sourceforge.net/"),
|
DBMS.ORACLE: (ORACLE_ALIASES, "python cx_Oracle", "http://cx-oracle.sourceforge.net/"),
|
||||||
|
|
|
@ -83,10 +83,7 @@ def __setRequestParams():
|
||||||
else:
|
else:
|
||||||
conf.data = conf.data.replace("\n", " ")
|
conf.data = conf.data.replace("\n", " ")
|
||||||
|
|
||||||
if re.match(SOAP_REGEX, conf.data, re.I | re.M):
|
place = PLACE.SOAP if re.match(SOAP_REGEX, conf.data, re.I | re.M) else PLACE.POST
|
||||||
place = PLACE.SOAP
|
|
||||||
else:
|
|
||||||
place = PLACE.POST
|
|
||||||
|
|
||||||
conf.parameters[place] = conf.data
|
conf.parameters[place] = conf.data
|
||||||
paramDict = paramToDict(place, conf.data)
|
paramDict = paramToDict(place, conf.data)
|
||||||
|
@ -167,7 +164,7 @@ def __setRequestParams():
|
||||||
condition = any((not conf.testParameter, intersect(conf.testParameter, USER_AGENT_ALIASES)))
|
condition = any((not conf.testParameter, intersect(conf.testParameter, USER_AGENT_ALIASES)))
|
||||||
|
|
||||||
if condition:
|
if condition:
|
||||||
conf.paramDict[PLACE.UA] = { PLACE.UA: headerValue }
|
conf.paramDict[PLACE.UA] = {PLACE.UA: headerValue}
|
||||||
testableParameters = True
|
testableParameters = True
|
||||||
|
|
||||||
elif httpHeader == PLACE.REFERER:
|
elif httpHeader == PLACE.REFERER:
|
||||||
|
@ -176,7 +173,7 @@ def __setRequestParams():
|
||||||
condition = any((not conf.testParameter, intersect(conf.testParameter, REFERER_ALIASES)))
|
condition = any((not conf.testParameter, intersect(conf.testParameter, REFERER_ALIASES)))
|
||||||
|
|
||||||
if condition:
|
if condition:
|
||||||
conf.paramDict[PLACE.REFERER] = { PLACE.REFERER: headerValue }
|
conf.paramDict[PLACE.REFERER] = {PLACE.REFERER: headerValue}
|
||||||
testableParameters = True
|
testableParameters = True
|
||||||
|
|
||||||
elif httpHeader == PLACE.HOST:
|
elif httpHeader == PLACE.HOST:
|
||||||
|
@ -185,7 +182,7 @@ def __setRequestParams():
|
||||||
condition = any((not conf.testParameter, intersect(conf.testParameter, HOST_ALIASES)))
|
condition = any((not conf.testParameter, intersect(conf.testParameter, HOST_ALIASES)))
|
||||||
|
|
||||||
if condition:
|
if condition:
|
||||||
conf.paramDict[PLACE.HOST] = { PLACE.HOST: headerValue }
|
conf.paramDict[PLACE.HOST] = {PLACE.HOST: headerValue}
|
||||||
testableParameters = True
|
testableParameters = True
|
||||||
|
|
||||||
if not conf.parameters:
|
if not conf.parameters:
|
||||||
|
|
|
@ -256,7 +256,7 @@ class Connect:
|
||||||
requestMsg += " %s" % httplib.HTTPConnection._http_vsn_str
|
requestMsg += " %s" % httplib.HTTPConnection._http_vsn_str
|
||||||
|
|
||||||
# Prepare HTTP headers
|
# Prepare HTTP headers
|
||||||
headers = forgeHeaders({ HTTPHEADER.COOKIE: cookie, HTTPHEADER.USER_AGENT: ua, HTTPHEADER.REFERER: referer })
|
headers = forgeHeaders({HTTPHEADER.COOKIE: cookie, HTTPHEADER.USER_AGENT: ua, HTTPHEADER.REFERER: referer})
|
||||||
|
|
||||||
if conf.realTest:
|
if conf.realTest:
|
||||||
headers[HTTPHEADER.REFERER] = "%s://%s" % (conf.scheme, conf.hostname)
|
headers[HTTPHEADER.REFERER] = "%s://%s" % (conf.scheme, conf.hostname)
|
||||||
|
|
|
@ -138,7 +138,7 @@ class Enumeration(GenericEnumeration):
|
||||||
infoMsg += "database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
infoMsg += "database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
return { conf.db: kb.data.cachedColumns[conf.db]}
|
return {conf.db: kb.data.cachedColumns[conf.db]}
|
||||||
|
|
||||||
infoMsg = "fetching columns "
|
infoMsg = "fetching columns "
|
||||||
infoMsg += "for table '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
infoMsg += "for table '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
||||||
|
|
|
@ -216,7 +216,7 @@ class Enumeration(GenericEnumeration):
|
||||||
infoMsg += "database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
infoMsg += "database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
return { conf.db: kb.data.cachedColumns[conf.db]}
|
return {conf.db: kb.data.cachedColumns[conf.db]}
|
||||||
|
|
||||||
if colList:
|
if colList:
|
||||||
table = {}
|
table = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user