mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
code refactoring
This commit is contained in:
parent
4cb83654dc
commit
13d5b2c0ff
|
@ -62,22 +62,21 @@ class advancedDict(dict):
|
||||||
def __setstate__(self, dict):
|
def __setstate__(self, dict):
|
||||||
self.__dict__ = dict
|
self.__dict__ = dict
|
||||||
|
|
||||||
def injectionDict():
|
class injectionDict(advancedDict):
|
||||||
injection = advancedDict()
|
def __init__(self):
|
||||||
|
advancedDict.__init__(self)
|
||||||
|
|
||||||
injection.place = None
|
self.place = None
|
||||||
injection.parameter = None
|
self.parameter = None
|
||||||
injection.ptype = None
|
self.ptype = None
|
||||||
injection.prefix = None
|
self.prefix = None
|
||||||
injection.suffix = None
|
self.suffix = None
|
||||||
injection.clause = None
|
self.clause = None
|
||||||
|
|
||||||
# data is a dict with stype as key and a tuple as value with
|
# data is a dict with stype as key and a tuple as value with
|
||||||
# title, where, comment and reqPayload
|
# title, where, comment and reqPayload
|
||||||
injection.data = advancedDict()
|
self.data = advancedDict()
|
||||||
|
|
||||||
injection.dbms = None
|
self.dbms = None
|
||||||
injection.dbms_version = None
|
self.dbms_version = None
|
||||||
injection.os = None
|
self.os = None
|
||||||
|
|
||||||
return injection
|
|
||||||
|
|
|
@ -1131,11 +1131,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
|
|
||||||
kb.data = advancedDict()
|
kb.data = advancedDict()
|
||||||
|
|
||||||
# Injection types
|
# Old style injection flag
|
||||||
kb.booleanTest = None
|
|
||||||
kb.errorTest = None
|
|
||||||
kb.stackedTest = None
|
|
||||||
kb.timeTest = None
|
|
||||||
kb.unionTest = None
|
kb.unionTest = None
|
||||||
|
|
||||||
# Basic back-end DBMS fingerprint
|
# Basic back-end DBMS fingerprint
|
||||||
|
@ -1154,8 +1150,6 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.hintValue = None
|
kb.hintValue = None
|
||||||
kb.htmlFp = []
|
kb.htmlFp = []
|
||||||
kb.injection = injectionDict()
|
kb.injection = injectionDict()
|
||||||
kb.injection.parameter = None
|
|
||||||
kb.injection.place = None
|
|
||||||
kb.injections = []
|
kb.injections = []
|
||||||
kb.lastErrorPage = None
|
kb.lastErrorPage = None
|
||||||
kb.lastQueryDuration = 0
|
kb.lastQueryDuration = 0
|
||||||
|
@ -1169,7 +1163,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.matchRatio = None
|
kb.matchRatio = None
|
||||||
kb.nullConnection = None
|
kb.nullConnection = None
|
||||||
kb.pageTemplate = None
|
kb.pageTemplate = None
|
||||||
kb.pageTemplates = advancedDict()
|
kb.pageTemplates = dict()
|
||||||
kb.originalPage = None
|
kb.originalPage = None
|
||||||
|
|
||||||
# Back-end DBMS underlying operating system fingerprint via banner (-b)
|
# Back-end DBMS underlying operating system fingerprint via banner (-b)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user