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