File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ def check
208
208
if res && res . code == 500 && res . body =~ /path is empty/
209
209
return Exploit ::CheckCode ::Appears
210
210
elsif res && res . code == 401
211
- print_warning ( "HTTP/#{ res . proto } #{ res . status } #{ res . message } -- incorrect USERNAME or PASSWORD?" )
211
+ print_warning ( "HTTP/#{ res . proto } #{ res . code } #{ res . message } -- incorrect USERNAME or PASSWORD?" )
212
212
return Exploit ::CheckCode ::Unknown
213
213
else
214
214
return Exploit ::CheckCode ::Safe
@@ -229,9 +229,13 @@ def exploit
229
229
230
230
script_name = "script-#{ Rex ::Text . rand_text_alphanumeric ( 16 ) } "
231
231
print_status ( "Uploading payload script #{ script_name } " )
232
- create_script_res = create_script ( script_name , cmd )
233
- unless create_script_res && create_script_res . code == 200
234
- print_error ( "Upload payload script failed" )
232
+ unless create_script_res = create_script ( script_name , cmd )
233
+ print_error ( "No response when uploading payload script" )
234
+ return false
235
+ end
236
+ unless create_script_res . code == 200
237
+ print_error ( "Upload payload script failed -- HTTP/#{ create_script_res . proto } " \
238
+ "#{ create_script_res . code } #{ create_script_res . message } " )
235
239
return false
236
240
end
237
241
unless script_exists? ( script_name )
You can’t perform that action at this time.
0 commit comments