Skip to content

Commit 096efea

Browse files
committed
added BULK to EXCLUDE_UNESCAPE and preventing crashes when output=[]
1 parent 008d434 commit 096efea

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,4 @@
251251
MYSQL_ERROR_TRIM_LENGTH = 100
252252

253253
# Do not unescape the injected statement if it contains any of the following SQL words
254-
EXCLUDE_UNESCAPE = ("WAITFOR DELAY ", " INTO DUMPFILE ", " INTO OUTFILE ", "CREATE ")
254+
EXCLUDE_UNESCAPE = ("WAITFOR DELAY ", " INTO DUMPFILE ", " INTO OUTFILE ", "CREATE ", "BULK ")

lib/takeover/xp_cmdshell.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ def xpCmdshellEvalCmd(self, cmd, first=None, last=None):
123123
output = inject.getValue("SELECT %s FROM %s" % (self.tblField, self.cmdTblName), resumeValue=False, sort=False, firstChar=first, lastChar=last)
124124
inject.goStacked("DELETE FROM %s" % self.cmdTblName)
125125

126-
if isinstance(output, (list, tuple)):
126+
if output and isinstance(output, (list, tuple)):
127127
output = output[0]
128128

129-
if isinstance(output, (list, tuple)):
129+
if output and isinstance(output, (list, tuple)):
130130
output = output[0]
131131

132132
return output

0 commit comments

Comments
 (0)