mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-06 04:51:23 -07:00
Fixed bug when IPv6 is disabled via GRUB.
This commit is contained in:
parent
44bfd1d221
commit
fa297c8a16
6 changed files with 68 additions and 29 deletions
11
utils.py
11
utils.py
|
@ -219,7 +219,15 @@ def FindLocalIP(Iface, OURIP):
|
|||
print(color("[!] Error: %s: Interface not found" % Iface, 1))
|
||||
sys.exit(-1)
|
||||
|
||||
|
||||
def Probe_IPv6_socket():
|
||||
"""Return true is IPv6 sockets are really supported, and False when IPv6 is not supported."""
|
||||
try:
|
||||
with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as s:
|
||||
s.bind(("::1", 0))
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
|
||||
def FindLocalIP6(Iface, OURIP):
|
||||
if Iface == 'ALL':
|
||||
return '::'
|
||||
|
@ -234,7 +242,6 @@ def FindLocalIP6(Iface, OURIP):
|
|||
s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
|
||||
s.connect((randIP+':80', 1))
|
||||
IP = s.getsockname()[0]
|
||||
print('IP is: %s'%IP)
|
||||
return IP
|
||||
except:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue