Skip to content

Commit 4b7a446

Browse files
author
Pedro Ribeiro
committed
... and restore use of the complicated socket
1 parent c78651f commit 4b7a446

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/exploits/windows/http/trackit_file_upload.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def get_traversal_path
188188

189189
buf << @packet_terminator.pack('C*')
190190

191-
sock = connect
191+
ctx = { 'Msf' => framework, 'MsfExploit' => self }
192+
sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['RPORT_REMOTING'], 'Context' => ctx })
192193
if sock.nil?
193194
fail_with(Exploit::Failure::Unreachable, "#{rhost}:#{@remoting_port.to_s} - Failed to connect to remoting service")
194195
else
@@ -419,7 +420,8 @@ def send_file(traversal_path, filename, file_content)
419420
buf << @packet_terminator.pack('C*')
420421

421422
# send the packet and ignore the response
422-
sock = connect
423+
ctx = { 'Msf' => framework, 'MsfExploit' => self }
424+
sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['RPORT_REMOTING'], 'Context' => ctx })
423425
if sock.nil?
424426
fail_with(Exploit::Failure::Unreachable, "#{rhost}:#{@remoting_port.to_s} - Failed to connect to remoting service")
425427
else

0 commit comments

Comments
 (0)