MCPcopy Create free account
hub / github.com/adobe/Marinus / main

Function main

python3_cron_scripts/get_owasp_amass.py:61–324  ·  view source on GitHub ↗

Begin main...

(logger=None)

Source from the content-addressed store, hash-verified

59
60
61def main(logger=None):
62 """
63 Begin main...
64 """
65 if logger is None:
66 logger = LoggingUtil.create_log(__name__)
67
68 mongo_connector = RemoteMongoConnector.RemoteMongoConnector()
69
70 now = datetime.now()
71 print("Starting: " + str(now))
72 logger.info("Starting...")
73
74 jobs_manager = JobsManager.JobsManager(mongo_connector, "owasp_amass")
75
76 amass_collection = mongo_connector.get_owasp_amass_connection()
77
78 output_dir = "./amass_files/"
79
80 arg_parser = argparse.ArgumentParser(
81 description="Run the OWASP Amass tool and store the results in the database."
82 )
83 arg_parser.add_argument(
84 "--config_file",
85 required=False,
86 help="An optional Amass config file. Otherwise, defaults will be used.",
87 )
88 arg_parser.add_argument(
89 "--amass_path", required=True, help="The path to the amass binary"
90 )
91 arg_parser.add_argument(
92 "--output_dir",
93 default=output_dir,
94 help="The local path where to save Amass files.",
95 )
96 arg_parser.add_argument(
97 "--docker_output_dir",
98 default=output_dir,
99 help="The path within Docker where to save Amass files.",
100 )
101 arg_parser.add_argument(
102 "--amass_version",
103 type=int,
104 default=3,
105 help="The version of OWASP Amass being used.",
106 )
107 arg_parser.add_argument(
108 "--amass_mode",
109 required=False,
110 type=str,
111 default="local",
112 choices=["local", "docker"],
113 help="The version of OWASP Amass being used.",
114 )
115 arg_parser.add_argument(
116 "--amass_timeout",
117 required=False,
118 type=str,

Callers 1

get_owasp_amass.pyFile · 0.70

Calls 11

record_job_startMethod · 0.95
get_zone_connectionMethod · 0.95
record_job_completeMethod · 0.95
create_logMethod · 0.80
perform_findMethod · 0.80
get_distinct_zonesMethod · 0.80
perform_distinctMethod · 0.80
perform_insertMethod · 0.80
check_save_locationFunction · 0.70

Tested by

no test coverage detected