Skip to content

Commit da2e088

Browse files
committed
Land rapid7#4536, Ruby 2.2 compat fixes
Note that ActiveRecord 3.2.21 still has a similar warning that will probably cause bugs, preventing full support for 2.2 until that's fixed.
2 parents e3e9a64 + 8c23e8c commit da2e088

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/msf/core/exploit/sunrpc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def sunrpc_create(protocol, program, version, time_out = timeout)
8484
rpcobj.pport = arr[5]
8585
end
8686

87-
def sunrpc_call(proc, buf, timeout = timeout)
87+
def sunrpc_call(proc, buf, timeout = timeout())
8888
ret = rpcobj.call(proc, buf, timeout)
8989
raise ::Rex::Proto::SunRPC::RPCError, "#{rhost}:#{rport} - SunRPC - No response to SunRPC call for procedure: #{proc}" unless ret
9090

modules/auxiliary/scanner/http/ektron_cms400net.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ def get_version
124124
end
125125
end
126126

127-
def do_login(user=nil, pass=nil, viewstate=viewstate, eventvalidation=eventvalidation)
127+
def do_login(user=nil, pass=nil, viewstate_arg=viewstate, eventvalidation_arg=eventvalidation)
128128
vprint_status("#{target_url} - Trying: username:'#{user}' with password:'#{pass}'")
129129

130-
post_data = "__VIEWSTATE=#{Rex::Text.uri_encode(viewstate.to_s)}"
131-
post_data << "&__EVENTVALIDATION=#{Rex::Text.uri_encode(eventvalidation.to_s)}"
130+
post_data = "__VIEWSTATE=#{Rex::Text.uri_encode(viewstate_arg.to_s)}"
131+
post_data << "&__EVENTVALIDATION=#{Rex::Text.uri_encode(eventvalidation_arg.to_s)}"
132132
post_data << "&username=#{Rex::Text.uri_encode(user.to_s)}"
133133
post_data << "&password=#{Rex::Text.uri_encode(pass.to_s)}"
134134

0 commit comments

Comments
 (0)