Skip to content

Commit cbccda1

Browse files
committed
fixing issue raised by @Meatballs1
1 parent 302193f commit cbccda1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/exploits/multi/http/struts_code_exec_parameters.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ def exploit
120120
end
121121

122122
#Now with all the arch specific stuff set, perform the upload.
123-
chunk_length = 2048 - (exec_cmd.length + datastore['TARGETURI'].length + datastore['PARAMETER'].length)
123+
#109 = length of command string plus the max length of append.
124+
sub_from_chunk = 109 + @payload_exe.length + datastore['TARGETURI'].length + datastore['PARAMETER'].length
125+
chunk_length = 2048 - sub_from_chunk
124126
chunk_length = ((chunk_length/4).floor)*3
125127
while pl_exe.length > chunk_length
126128
java_upload_part(pl_exe[0,chunk_length],@payload_exe,append)

0 commit comments

Comments
 (0)