示例#1
0
def test_parsemassscan_output_location(tmp_path):
    pmo = ParseMasscanOutput(target_file=tf,
                             exempt_list=el,
                             results_dir=str(tmp_path),
                             top_ports=100)

    assert pmo.output().path == str(
        Path(tmp_path) / "masscan-results" / "masscan.parsed.pickle")
示例#2
0
    def requires(self):
        """ GatherWebTargets depends on ParseMasscanOutput and ParseAmassOutput to run.

        ParseMasscanOutput expects rate, target_file, interface, and either ports or top_ports as parameters.
        ParseAmassOutput accepts exempt_list and expects target_file

        Returns:
            dict(str: ParseMasscanOutput, str: ParseAmassOutput)
        """
        args = {
            "results_dir": self.results_dir,
            "rate": self.rate,
            "target_file": self.target_file,
            "top_ports": self.top_ports,
            "interface": self.interface,
            "ports": self.ports,
        }
        return {
            "masscan-output":
            ParseMasscanOutput(**args),
            "amass-output":
            ParseAmassOutput(exempt_list=self.exempt_list,
                             target_file=self.target_file,
                             results_dir=self.results_dir),
        }
示例#3
0
    def requires(self):
        """ ThreadedNmap depends on ParseMasscanOutput to run.

        TargetList expects target_file as a parameter.
        Masscan expects rate, target_file, interface, and either ports or top_ports as parameters.

        Returns:
            luigi.Task - ParseMasscanOutput
        """
        args = {
            "results_dir": self.results_dir,
            "rate": self.rate,
            "target_file": self.target_file,
            "top_ports": self.top_ports,
            "interface": self.interface,
            "ports": self.ports,
        }
        return ParseMasscanOutput(**args)