Insert the matched domain into the collection of positive results.
(entry, results_collection)
| 84 | |
| 85 | |
| 86 | def 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 | |
| 104 | def run_port_80_command(target_list, tnum): |