def findHttpServices(self, address): h = Helper() if ((h.ip_validate(address) is None) and (h.hostname_validate(address) is None)): return {} th = [] for tn in range(1, 100): t = threading.Thread(target=self.check, kwargs={'address': address}) t.setDaemon(True) th.append(t) for t in th: t.start() t.join() result = { 'hostname': address, 'addresses': h.resolve_dns(address), 'webservices': self.webservices } return result
def define_host(langbuf, param): global hostname h = Helper() if h.hostname_validate(param) is None: Logging.log(h.getlang(langbuf, 'errors', 'invalid-hostname'), LogLevel.DANGER) exit(-1) else: hostname = param