def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) self.ftp = _FTP(timeout=3) # ftplib FTP instance return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) self.host, self.port, self.scheme, self.path = self._parse_url(self.target) return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) self.host = self._get_ipv4addr(self.target['host']) return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) self.ports = self._make_portlist(self.def_tcp_ports) return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) self._check_iputils() self.uname = self._get_uname()[0] return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) # requests self.headers = {'User-Agent': self.useragent} self.req = requests.get(self.target, verify=False, timeout=3, headers=self.headers, allow_redirects=True) return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) # default ncat options + proxy options self.ncat_opts = '-w 3 -i 1 -u' if self.opts['proxy']: host, port, scheme, path = self._parse_url(self.opts['proxy']) proxy = f'{host}:{port}' if self.opts['proxy_user'] and self.opts['proxy_pass']: proxy_user = self.opts['proxy_user'] proxy_pass = self.opts['proxy_pass'] self.ncat_opts += f' --proxy {proxy} --proxy-type {scheme}' if proxy_user and proxy_pass: self.ncat_opts += f' --proxy-auth {proxy_user}:{proxy_pass}' return
def __init__(self, target, opts): """ init """ Base.__init__(self, target, opts) return