mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-20 13:23:38 -07:00
Update utils.py
It wasn't redirecting to the specified location.
This commit is contained in:
parent
4906e7dbb7
commit
063b31e6ca
1 changed files with 9 additions and 6 deletions
3
utils.py
3
utils.py
|
@ -105,12 +105,15 @@ def FindLocalIP(Iface, OURIP):
|
||||||
if IsOsX():
|
if IsOsX():
|
||||||
return OURIP
|
return OURIP
|
||||||
else:
|
else:
|
||||||
|
if OURIP == None:
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
s.setsockopt(socket.SOL_SOCKET, 25, Iface+'\0')
|
s.setsockopt(socket.SOL_SOCKET, 25, Iface+'\0')
|
||||||
s.connect(("127.0.0.1",9))#RFC 863
|
s.connect(("127.0.0.1",9))#RFC 863
|
||||||
ret = s.getsockname()[0]
|
ret = s.getsockname()[0]
|
||||||
s.close()
|
s.close()
|
||||||
return ret
|
return ret
|
||||||
|
else:
|
||||||
|
return OURIP
|
||||||
|
|
||||||
except socket.error:
|
except socket.error:
|
||||||
print color("[!] Error: %s: Interface not found" % Iface, 1)
|
print color("[!] Error: %s: Interface not found" % Iface, 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue