def cors(target, header_dict, delay): url = target root = host(url) parsed = urlparse(url) netloc = parsed.netloc scheme = parsed.scheme url = scheme + '://' + netloc return active_tests(url, root, scheme, header_dict, delay)
def cors(target, delay, scheme=False): url = target if not target.startswith(('http://', 'https://')): url = scheme + '://' + url root = host(url) parsed = urlparse(url) netloc = parsed.netloc scheme = parsed.scheme url = scheme + '://' + netloc active = active_tests(url, root, scheme, delay) return active
def cors(target, header_dict, delay): url = target root = host(url) parsed = urlparse(url) netloc = parsed.netloc scheme = parsed.scheme url = scheme + '://' + netloc + parsed.path try: return active_tests(url, root, scheme, header_dict, delay) except ConnectionError as exc: print('%s Unable to connect to %s' % (bad, root))
def cors(target, header_dict, delay): url = target root = host(url) parsed = urlparse(url) netloc = parsed.netloc scheme = parsed.scheme url = scheme + '://' + netloc try: return active_tests(url, root, scheme, header_dict, delay) except ConnectionError as exc: print(f'[WARNING] Unable to connect to {target}: {exc}')