mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-24 10:37:51 +00:00
working on issue #12
This commit is contained in:
parent
57f2fccc24
commit
d492291744
36 changed files with 72 additions and 72 deletions
|
|
@ -46,7 +46,7 @@ class Agent:
|
|||
|
||||
if kb.tamperFunctions:
|
||||
for function in kb.tamperFunctions:
|
||||
query = function(query)
|
||||
query, _ = function(payload=query, headers=None)
|
||||
|
||||
return query
|
||||
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ def __setTamperingFunctions():
|
|||
priority = PRIORITY.NORMAL if not hasattr(module, '__priority__') else module.__priority__
|
||||
|
||||
for name, function in inspect.getmembers(module, inspect.isfunction):
|
||||
if name == "tamper" and function.func_code.co_argcount == 1:
|
||||
if name == "tamper" and function.func_code.co_argcount == 2:
|
||||
found = True
|
||||
kb.tamperFunctions.append(function)
|
||||
|
||||
|
|
@ -829,7 +829,9 @@ def __setTamperingFunctions():
|
|||
function()
|
||||
|
||||
if not found:
|
||||
raise sqlmapGenericException, "missing function 'tamper(value)' in tamper script '%s'" % tfile
|
||||
errMsg = "missing function 'tamper(payload, headers)' "
|
||||
errMsg += "in tamper script '%s'" % tfile
|
||||
raise sqlmapGenericException, errMsg
|
||||
|
||||
if resolve_priorities and priorities:
|
||||
priorities.sort(reverse=True)
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ class Connect:
|
|||
if payload:
|
||||
if kb.tamperFunctions:
|
||||
for function in kb.tamperFunctions:
|
||||
payload = function(payload)
|
||||
payload, auxHeaders = function(payload=payload, headers=auxHeaders)
|
||||
|
||||
value = agent.replacePayload(value, payload)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue