Skip to content

Commit 55128f5

Browse files
committed
Make sure res has value before passing it on to exec_php
1 parent 033a11e commit 55128f5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/exploits/unix/webapp/projectpier_upload_exec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ def exploit
164164
print_status("#{@peer} - Uploading PHP payload (#{p.length.to_s} bytes)...")
165165
res = upload_php(base, php_fname, p, folder_name)
166166

167+
if not res
168+
print_error("#{@peer} - No response from server")
169+
return
170+
end
171+
167172
print_status("#{@peer} - Executing '#{php_fname}'...")
168173
exec_php(base, res)
169174
end

0 commit comments

Comments
 (0)