bind to LHOST instead of 0.0.0.0, fixes #262

git-svn-id: file:///home/svn/framework3/trunk@5969 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2008-11-21 01:09:17 +00:00
parent 7d2f0c1bc0
commit f1e71237e4
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ module ReverseTcp
# Switch to IPv6 ANY address if the LHOST is also IPv6 # Switch to IPv6 ANY address if the LHOST is also IPv6
addr = Rex::Socket.resolv_nbo(datastore['LHOST']) addr = Rex::Socket.resolv_nbo(datastore['LHOST'])
lsnr = (addr.length == 4) ? "0.0.0.0" : "::0" lsnr = Rex::Socket.addr_ntoa(addr)
self.listener_sock = Rex::Socket::TcpServer.create( self.listener_sock = Rex::Socket::TcpServer.create(
'LocalHost' => lsnr, 'LocalHost' => lsnr,
@ -146,4 +146,4 @@ protected
end end
end end
end end