intelmq icon indicating copy to clipboard operation
intelmq copied to clipboard

Using deprecated method of dnspython

Open sebix opened this issue 3 years ago • 0 comments

Changelog of version 2.0.0:

dns.resolver.resolve() has been added, allowing control of whether search lists are used. dns.resolver.query() is retained for backwards compatibility, but deprecated. The default for search list behavior can be set at in the resolver object with the use_search_by_default parameter. The default is False.

dns.resolver.query() is used here:

https://github.com/certtools/intelmq/blob/651d0733f719579e96ec4b063a260023ebeadc50/intelmq/lib/harmonization.py#L705=

https://github.com/certtools/intelmq/blob/0c6b3269ac480e47c62c9c31ff8685ba90d91f55/intelmq/bots/experts/abusix/_lib.py#L29= https://github.com/certtools/intelmq/blob/3bbf1201ad783664985f00be4ba7a44ce5b05e8d/intelmq/bots/experts/reverse_dns/expert.py#L70= https://github.com/certtools/intelmq/blob/0c6b3269ac480e47c62c9c31ff8685ba90d91f55/intelmq/bots/experts/cymru_whois/_lib.py#L57=

We also need backwards compatibility with dnspython < 2 (e.g. Ubuntu 20.04), so we could add a DNS-Query functon in utils with a if version < 2 then ... else ... switch.

sebix avatar Jul 04 '22 19:07 sebix