mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-24 00:19:02 +00:00
adding switch --eval
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user