Get the DNS Type integer for the Google DNS query
(logger, result, GDNS)
| 98 | |
| 99 | |
| 100 | def get_lookup_int(logger, result, GDNS): |
| 101 | """ |
| 102 | Get the DNS Type integer for the Google DNS query |
| 103 | """ |
| 104 | if result["type"].startswith("unk_in_"): |
| 105 | # Sonar didn't know what it was. |
| 106 | |
| 107 | new_type = fix_unk_types(logger, result["type"], GDNS) |
| 108 | if new_type.startswith("unk_in"): |
| 109 | # Marinus doesn't know what it is either. |
| 110 | lookup_int = get_int_for_unk_type(result["type"]) |
| 111 | else: |
| 112 | # Marinus was able to translate it. |
| 113 | lookup_int = GDNS.DNS_TYPES[new_type] |
| 114 | else: |
| 115 | # Normal type |
| 116 | lookup_int = GDNS.DNS_TYPES[result["type"]] |
| 117 | |
| 118 | return lookup_int |
| 119 | |
| 120 | |
| 121 | def insert_current_results(logger, dns_result, dns_manager, result, source): |
no test coverage detected