Skip to content

Commit 96327b6

Browse files
committed
1 parent 166dc98 commit 96327b6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/controller/checks.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,12 @@ def checkSqlInjection(place, parameter, value):
386386
# Forge request payload by prepending with boundary's
387387
# prefix and appending the boundary's suffix to the
388388
# test's ' <payload><comment> ' string
389-
boundPayload = agent.prefixQuery(fstPayload, prefix, where, clause)
390-
boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
391-
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
389+
if fstPayload:
390+
boundPayload = agent.prefixQuery(fstPayload, prefix, where, clause)
391+
boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
392+
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
393+
else:
394+
reqPayload = None
392395

393396
# Perform the test's request and check whether or not the
394397
# payload was successful

lib/core/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def payloadDirect(self, query):
6868

6969
return query
7070

71-
def payload(self, place=None, parameter=None, value=None, newValue="", where=None):
71+
def payload(self, place=None, parameter=None, value=None, newValue=None, where=None):
7272
"""
7373
This method replaces the affected parameter with the SQL
7474
injection statement to request

0 commit comments

Comments
 (0)