mirror of
https://github.com/lgandx/Responder.git
synced 2026-01-19 12:59:03 +00:00
fix: Bind to interface bug.
This commit is contained in:
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__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user