コード例 #1
0
ファイル: corsy.py プロジェクト: shelld3v/Corsy
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)
コード例 #2
0
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
コード例 #3
0
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))
コード例 #4
0
ファイル: corsy.py プロジェクト: davidmckennirey/Corsy
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}')