Minor cleanup of IPv6 support code.
- Use self for static method call. - Remove extraneous spaces.
This commit is contained in:
parent
e11012437a
commit
247b74950d
|
|
@ -736,12 +736,12 @@ Sec-WebSocket-Accept: %s\r
|
|||
is a WebSockets client then call new_client() method (which must
|
||||
be overridden) for each new client connection.
|
||||
"""
|
||||
addr = WebSocketServer.addrinfo(self.listen_host, self.listen_port)
|
||||
addr = self.addrinfo(self.listen_host, self.listen_port)
|
||||
lsock = socket.socket(addr[0], addr[1])
|
||||
lsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
lsock.bind((self.listen_host, self.listen_port))
|
||||
lsock.listen(100)
|
||||
|
||||
|
||||
if self.daemon:
|
||||
self.daemonize(keepfd=lsock.fileno(), chdir=self.web)
|
||||
|
||||
|
|
|
|||
|
|
@ -141,10 +141,10 @@ Traffic Legend:
|
|||
# Connect to the target
|
||||
self.msg("connecting to: %s:%s" % (
|
||||
self.target_host, self.target_port))
|
||||
addr = WebSocketServer.addrinfo(self.target_host, self.target_port)
|
||||
addr = self.addrinfo(self.target_host, self.target_port)
|
||||
tsock = socket.socket(addr[0], addr[1])
|
||||
tsock.connect((self.target_host, self.target_port))
|
||||
|
||||
|
||||
if self.verbose and not self.daemon:
|
||||
print(self.traffic_legend)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue