def __init__(self, port = 0, fam = socket.AF_INET, typ = socket.SOCK_STREAM, proto = 0, timeout = 'default'): basesock.__init__(self, timeout) self.family = fam self.type = typ self.proto = proto self.listensock = None self.sock = None self.port = port self.target = None self.start()
def __init__(self, port=0, fam=socket.AF_INET, typ=socket.SOCK_STREAM, proto=0, timeout='default'): basesock.__init__(self, timeout) self.family = fam self.type = typ self.proto = proto self.listensock = None self.sock = None self.port = port self.target = None self.start()
def __init__(self, host, port = 1337, fam = None, typ = socket.SOCK_STREAM, proto = 0, timeout = 'default'): basesock.__init__(self, timeout) port = int(port) self.target = (host, port) if fam is None: if host.find(':') != -1: self.family = socket.AF_INET6 else: self.family = socket.AF_INET self.type = typ self.proto = proto self.sock = None self.lhost = None self.lport = None self.connect()
def __init__(self, host, port=1337, fam=None, typ=socket.SOCK_STREAM, proto=0, timeout='default', silent=False): basesock.__init__(self, timeout) port = int(port) self.target = (host, port) if fam is None: if host.find(':') != -1: self.family = socket.AF_INET6 else: self.family = socket.AF_INET self.type = typ self.proto = proto self.sock = None self.lhost = None self.lport = None self.silent = silent self.connect()