Esempio n. 1
0
def test_parse_amass_ip6_results(tmp_path):
    pao = ParseAmassOutput(target_file=tf, exempt_list=el, results_dir=str(tmp_path))

    pao.input = lambda: luigi.LocalTarget(amass_json)
    pao.run()

    contents = (Path(pao.output().get("target-ip6s").path)).read_text()

    for line in contents.split():
        assert line.strip() in ip6s
Esempio n. 2
0
def test_parse_amass_ip6_results_only_contain_ipv6_addys(tmp_path):
    pao = ParseAmassOutput(target_file=tf, exempt_list=el, results_dir=str(tmp_path))

    pao.input = lambda: luigi.LocalTarget(amass_json)
    pao.run()

    contents = (Path(pao.output().get("target-ip6s").path)).read_text()

    for line in contents.split():
        try:
            ipaddress.ip_interface(line.strip())  # is it a valid ip/network?
        except ValueError:
            assert 0