stub out private meterpreter accessor method net
This commit is contained in:
parent
2a6db4092d
commit
b29459747b
|
@ -34,8 +34,9 @@ RSpec.describe Msf::Sessions::Meterpreter do
|
|||
|
||||
subject(:connected_address) do
|
||||
m = described_class.new(StringIO.new(""), skip_ssl: true)
|
||||
allow(m).to receive_message_chain(:net, :config, :get_interfaces).and_return(interfaces)
|
||||
allow(m).to receive_message_chain(:net, :config, :get_routes).and_return(routes)
|
||||
allow(m).to receive_message_chain(:private_methods, :net)
|
||||
allow(m).to receive_message_chain(:private_methods, :net, :config, :get_interfaces).and_return(interfaces)
|
||||
allow(m).to receive_message_chain(:private_methods, :net, :config, :get_routes).and_return(routes)
|
||||
m.session_host = session_host
|
||||
|
||||
m.send(:find_internet_connected_address)
|
||||
|
|
Loading…
Reference in New Issue