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

Function insert_result

python3_cron_scripts/search_censys_files_new.py:136–142  ·  view source on GitHub ↗

Insert the matched IP into the collection of positive results. This was done as an update because it was clear whether Censys would de-duplicate.

(entry, results_collection)

Source from the content-addressed store, hash-verified

134
135
136def insert_result(entry, results_collection):
137 """
138 Insert the matched IP into the collection of positive results.
139 This was done as an update because it was clear whether Censys would de-duplicate.
140 """
141 entry["createdAt"] = datetime.utcnow()
142 results_collection.update_one({"ip": entry["ip"]}, entry, upsert=True)
143
144
145def main(logger=None):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected