mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-14 02:27:12 -07:00
fix: Bind to interface bug.
This commit is contained in:
parent
81b1f8f2c1
commit
a1a4f46c7b
1 changed files with 31 additions and 15 deletions
46
Responder.py
46
Responder.py
|
@ -2108,25 +2108,40 @@ ThreadingTCPServer.allow_reuse_address = 1
|
|||
|
||||
|
||||
def serve_thread_udp(host, port, handler):
|
||||
try:
|
||||
server = ThreadingUDPServer((host, port), handler)
|
||||
server.serve_forever()
|
||||
except:
|
||||
print "Error starting UDP server on port " + str(port) + ". Check that you have the necessary permissions (i.e. root), no other servers are running and the correct network interface is set in Responder.conf."
|
||||
try:
|
||||
if OsInterfaceIsSupported(INTERFACE):
|
||||
IP = FindLocalIP(BIND_TO_Interface)
|
||||
server = ThreadingUDPServer((IP, port), handler)
|
||||
server.serve_forever()
|
||||
else:
|
||||
server = ThreadingUDPServer((host, port), handler)
|
||||
server.serve_forever()
|
||||
except:
|
||||
print "Error starting UDP server on port " + str(port) + ". Check that you have the necessary permissions (i.e. root), no other servers are running and the correct network interface is set in Responder.conf."
|
||||
|
||||
def serve_thread_tcp(host, port, handler):
|
||||
try:
|
||||
server = ThreadingTCPServer((host, port), handler)
|
||||
server.serve_forever()
|
||||
except:
|
||||
print "Error starting TCP server on port " + str(port) + ". Check that you have the necessary permissions (i.e. root), no other servers are running and the correct network interface is set in Responder.conf."
|
||||
try:
|
||||
if OsInterfaceIsSupported(INTERFACE):
|
||||
IP = FindLocalIP(BIND_TO_Interface)
|
||||
server = ThreadingTCPServer((IP, port), handler)
|
||||
server.serve_forever()
|
||||
else:
|
||||
server = ThreadingTCPServer((host, port), handler)
|
||||
server.serve_forever()
|
||||
except:
|
||||
print "Error starting TCP server on port " + str(port) + ". Check that you have the necessary permissions (i.e. root), no other servers are running and the correct network interface is set in Responder.conf."
|
||||
|
||||
def serve_thread_SSL(host, port, handler):
|
||||
try:
|
||||
server = SSlSock((host, port), handler)
|
||||
server.serve_forever()
|
||||
except:
|
||||
print "Error starting TCP server on port " + str(port) + ". Check that you have the necessary permissions (i.e. root), no other servers are running and the correct network interface is set in Responder.conf."
|
||||
try:
|
||||
if OsInterfaceIsSupported(INTERFACE):
|
||||
IP = FindLocalIP(BIND_TO_Interface)
|
||||
server = SSlSock((IP, port), handler)
|
||||
server.serve_forever()
|
||||
else:
|
||||
server = SSlSock((host, port), handler)
|
||||
server.serve_forever()
|
||||
except:
|
||||
print "Error starting TCP server on port " + str(port) + ". Check that you have the necessary permissions (i.e. root), no other servers are running and the correct network interface is set in Responder.conf."
|
||||
|
||||
def main():
|
||||
try:
|
||||
|
@ -2160,3 +2175,4 @@ if __name__ == '__main__':
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue