mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
adding switch --eval
This commit is contained in:
parent
0ce885e6e6
commit
65b2b0ad87
7 changed files with 47 additions and 3 deletions
|
|
@ -3135,4 +3135,11 @@ def getHostHeader(url):
|
|||
if any(map(lambda x: retVal.endswith(':%d' % x), [80, 443])):
|
||||
retVal = retVal.split(':')[0]
|
||||
|
||||
return retVal
|
||||
return retVal
|
||||
|
||||
def executeCode(code, variables=None):
|
||||
try:
|
||||
exec(code, variables)
|
||||
except Exception, ex:
|
||||
errMsg = "an error occured while evaluating provided code ('%s'). " % ex
|
||||
raise sqlmapGenericException, errMsg
|
||||
|
|
|
|||
|
|
@ -1402,7 +1402,6 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.dynamicMarkings = []
|
||||
kb.dynamicParameters = False
|
||||
kb.endDetection = False
|
||||
kb.httpErrorCodes = {}
|
||||
kb.explicitSettings = set()
|
||||
kb.errorIsNone = True
|
||||
kb.forcedDbms = None
|
||||
|
|
@ -1411,6 +1410,8 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.heuristicTest = None
|
||||
kb.hintValue = None
|
||||
kb.htmlFp = []
|
||||
kb.httpErrorCodes = {}
|
||||
kb.inferenceMode = False
|
||||
kb.ignoreTimeout = False
|
||||
kb.injection = InjectionDict()
|
||||
kb.injections = []
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ optDict = {
|
|||
"retries": "integer",
|
||||
"scope": "string",
|
||||
"safUrl": "string",
|
||||
"saFreq": "integer"
|
||||
"saFreq": "integer",
|
||||
"evalCode": "string"
|
||||
},
|
||||
|
||||
"Optimization": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue