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

Function insert_result

python3_cron_scripts/zgrab_http_domain.py:86–101  ·  view source on GitHub ↗

Insert the matched domain into the collection of positive results.

(entry, results_collection)

Source from the content-addressed store, hash-verified

84
85
86def insert_result(entry, results_collection):
87 """
88 Insert the matched domain into the collection of positive results.
89 """
90 if "zgrab2" in global_zgrab_path:
91 temp_date = entry["data"]["http"]["timestamp"]
92 new_date = parse(temp_date)
93 entry["timestamp"] = new_date
94 entry["data"]["http"]["timestamp"] = new_date
95 entry["ip"] = "<nil>"
96 else:
97 temp_date = entry["timestamp"]
98 new_date = parse(temp_date)
99 entry["timestamp"] = new_date
100
101 results_collection.replace_one({"domain": entry["domain"]}, entry, upsert=True)
102
103
104def run_port_80_command(target_list, tnum):

Callers 1

process_threadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected