(self, *args, **kwargs)
| 14 | class DshellPlugin(dnsplugin.DNSPlugin): |
| 15 | |
| 16 | def __init__(self, *args, **kwargs): |
| 17 | super().__init__( |
| 18 | name="DNS Country Code", |
| 19 | description="identify country code of DNS A/AAAA record responses", |
| 20 | bpf="port 53", |
| 21 | author="bg", |
| 22 | output=AlertOutput(label=__name__), |
| 23 | optiondict={ |
| 24 | 'foreign': { |
| 25 | 'action': 'store_true', |
| 26 | 'help': 'report responses in non-US countries' |
| 27 | }, |
| 28 | 'code': { |
| 29 | 'type': str, |
| 30 | 'help': 'filter on a specific country code (ex. US, DE, JP, etc.)' |
| 31 | } |
| 32 | } |
| 33 | ) |
| 34 | |
| 35 | def dns_handler(self, conn, requests, responses): |
| 36 | "pull out the A/AAAA queries from the last DNS request in a connection" |
nothing calls this directly
no test coverage detected