Esempio n. 1
0
def cmd_contest():
    """Example script."""
    print("IP:    %s" % contest.check_ip())
    print("DNS:   %s" % contest.check_dns())
    print("FTP:   %s" % contest.check_ftp())
    print("SSH:   %s" % contest.check_ssh())
    print("HTTP:  %s" % contest.check_http())
    print("HTTPS: %s" % contest.check_https())
Esempio n. 2
0
def cmd_net_contest():
    """Try to connect to various services and check if can
    reach them using your internet connection.

    Example:

    \b
    $ habu.net.contest
    DNS:   True
    FTP:   True
    SSH:   True
    HTTP:  True
    HTTPS: True"""

    print("DNS:   %s" % contest.check_dns())
    print("FTP:   %s" % contest.check_ftp())
    print("SSH:   %s" % contest.check_ssh())
    print("HTTP:  %s" % contest.check_http())
    print("HTTPS: %s" % contest.check_https())
Esempio n. 3
0
def cmd_contest():
    """Try to connect to various services and check if can
    reach them using your internet connection.

    Example:

    \b
    $ habu.contest
    IP:    True
    DNS:   True
    FTP:   True
    SSH:   True
    HTTP:  True
    HTTPS: True"""

    print("IP:    %s" % contest.check_ip())
    print("DNS:   %s" % contest.check_dns())
    print("FTP:   %s" % contest.check_ftp())
    print("HTTP:  %s" % contest.check_http())
    print("HTTPS: %s" % contest.check_https())
Esempio n. 4
0
def test_https_fail():
    assert contest.check_https(urls=['https://www.google.com:92']) == False
Esempio n. 5
0
def test_https_success():
    assert contest.check_https() == True