Remove loopback restriction
It's occasionally useful, and we already warn when setting it.GSoC/Meterpreter_Web_Console
parent
a370270e19
commit
6f1e75e097
|
@ -2161,8 +2161,7 @@ class Core
|
|||
# XXX: We repurpose OptAddressLocal#interfaces, so we can't put this in Rex
|
||||
def tab_complete_source_interface(o)
|
||||
return [] unless o.is_a?(Msf::OptAddressLocal)
|
||||
# Exclude loopback generically
|
||||
o.interfaces - %w{lo lo0}
|
||||
o.interfaces
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -290,10 +290,8 @@ module DispatcherShell
|
|||
addresses = [Rex::Socket.source_address]
|
||||
# getifaddrs was introduced in 2.1.2
|
||||
if ::Socket.respond_to?(:getifaddrs)
|
||||
ifaddrs = ::Socket.getifaddrs.find_all do |ifaddr|
|
||||
((ifaddr.flags & ::Socket::IFF_LOOPBACK) == 0) &&
|
||||
ifaddr.addr &&
|
||||
ifaddr.addr.ip?
|
||||
ifaddrs = ::Socket.getifaddrs.select do |ifaddr|
|
||||
ifaddr.addr && ifaddr.addr.ip?
|
||||
end
|
||||
addresses += ifaddrs.map { |ifaddr| ifaddr.addr.ip_address }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue