From 478505c17aa5ead078d61e9aa2ded54efc2ef90a Mon Sep 17 00:00:00 2001 From: dmooray Date: Wed, 7 Jan 2015 11:41:34 +0200 Subject: [PATCH 1/2] ruby 2.2 compatibility https://bugs.ruby-lang.org/issues/10314 --- lib/msf/core/exploit/sunrpc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/exploit/sunrpc.rb b/lib/msf/core/exploit/sunrpc.rb index b9ab02d6b7..f8c9055f30 100644 --- a/lib/msf/core/exploit/sunrpc.rb +++ b/lib/msf/core/exploit/sunrpc.rb @@ -84,7 +84,7 @@ module Exploit::Remote::SunRPC rpcobj.pport = arr[5] end - def sunrpc_call(proc, buf, timeout = timeout) + def sunrpc_call(proc, buf, timeout = timeout()) ret = rpcobj.call(proc, buf, timeout) raise ::Rex::Proto::SunRPC::RPCError, "#{rhost}:#{rport} - SunRPC - No response to SunRPC call for procedure: #{proc}" unless ret From 8c23e8c2e8aa80f88fe16397405431dd3bbaf2ab Mon Sep 17 00:00:00 2001 From: dmooray Date: Wed, 7 Jan 2015 12:00:50 +0200 Subject: [PATCH 2/2] ruby 2.2 compatibility Fix circular argument reference warnings for ruby 2.2 --- modules/auxiliary/scanner/http/ektron_cms400net.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/auxiliary/scanner/http/ektron_cms400net.rb b/modules/auxiliary/scanner/http/ektron_cms400net.rb index 66f90d252f..b6dd8c5391 100644 --- a/modules/auxiliary/scanner/http/ektron_cms400net.rb +++ b/modules/auxiliary/scanner/http/ektron_cms400net.rb @@ -124,11 +124,11 @@ class Metasploit3 < Msf::Auxiliary end end - def do_login(user=nil, pass=nil, viewstate=viewstate, eventvalidation=eventvalidation) + def do_login(user=nil, pass=nil, viewstate_arg=viewstate, eventvalidation_arg=eventvalidation) vprint_status("#{target_url} - Trying: username:'#{user}' with password:'#{pass}'") - post_data = "__VIEWSTATE=#{Rex::Text.uri_encode(viewstate.to_s)}" - post_data << "&__EVENTVALIDATION=#{Rex::Text.uri_encode(eventvalidation.to_s)}" + post_data = "__VIEWSTATE=#{Rex::Text.uri_encode(viewstate_arg.to_s)}" + post_data << "&__EVENTVALIDATION=#{Rex::Text.uri_encode(eventvalidation_arg.to_s)}" post_data << "&username=#{Rex::Text.uri_encode(user.to_s)}" post_data << "&password=#{Rex::Text.uri_encode(pass.to_s)}"