Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for User Defined DNS Resolver Object #83

Merged
merged 3 commits into from
Dec 18, 2022

Conversation

stcz
Copy link
Contributor

@stcz stcz commented Oct 5, 2022

This MR allows passing a user defined resolver object (dns.resolver.Resolver()) to the DNS Requests. This is useful, when you use functions, and you want to pass special options to the resolver object.

The Settings timeout and nameservers are ignored, when a resolver is given.

Please review or comment. I just tested it in my use case, but tried to adapt for all use cases.

I'm currently unsure how to handle the test_dnssec() function, especially the dns.query.udp() for me, it is OK to ignore it.

Copy link
Contributor

@seanthegeek seanthegeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please break up the liness listed below to stay within the line lengths required by the PEP8 standard

checkdmarc.py:619:80: E501 line too long (81 > 79 characters)
checkdmarc.py:628:80: E501 line too long (83 > 79 characters)
checkdmarc.py:676:80: E501 line too long (83 > 79 characters)
checkdmarc.py:690:80: E501 line too long (86 > 79 characters)
checkdmarc.py:708:80: E501 line too long (83 > 79 characters)
checkdmarc.py:722:80: E501 line too long (86 > 79 characters)
checkdmarc.py:747:80: E501 line too long (83 > 79 characters)
checkdmarc.py:761:80: E501 line too long (91 > 79 characters)
checkdmarc.py:785:80: E501 line too long (83 > 79 characters)
checkdmarc.py:794:80: E501 line too long (87 > 79 characters)
checkdmarc.py:811:80: E501 line too long (83 > 79 characters)
checkdmarc.py:822:80: E501 line too long (87 > 79 characters)
checkdmarc.py:842:80: E501 line too long (83 > 79 characters)
checkdmarc.py:854:80: E501 line too long (87 > 79 characters)
checkdmarc.py:900:80: E501 line too long (82 > 79 characters)
checkdmarc.py:909:80: E501 line too long (83 > 79 characters)
checkdmarc.py:921:80: E501 line too long (87 > 79 characters)
checkdmarc.py:973:80: E501 line too long (83 > 79 characters)
checkdmarc.py:993:80: E501 line too long (84 > 79 characters)
checkdmarc.py:1007:80: E501 line too long (93 > 79 characters)
checkdmarc.py:1018:80: E501 line too long (82 > 79 characters)
checkdmarc.py:1027:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1047:80: E501 line too long (91 > 79 characters)
checkdmarc.py:1159:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1197:80: E501 line too long (82 > 79 characters)
checkdmarc.py:1206:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1223:80: E501 line too long (97 > 79 characters)
checkdmarc.py:1274:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1395:80: E501 line too long (95 > 79 characters)
checkdmarc.py:1398:80: E501 line too long (91 > 79 characters)
checkdmarc.py:1435:80: E501 line too long (95 > 79 characters)
checkdmarc.py:1438:80: E501 line too long (91 > 79 characters)
checkdmarc.py:1491:80: E501 line too long (93 > 79 characters)
checkdmarc.py:1500:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1523:80: E501 line too long (82 > 79 characters)
checkdmarc.py:1530:80: E501 line too long (90 > 79 characters)
checkdmarc.py:1545:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1561:80: E501 line too long (97 > 79 characters)
checkdmarc.py:1577:80: E501 line too long (87 > 79 characters)
checkdmarc.py:1605:80: E501 line too long (94 > 79 characters)
checkdmarc.py:1617:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1696:80: E501 line too long (93 > 79 characters)
checkdmarc.py:1708:80: E501 line too long (91 > 79 characters)
checkdmarc.py:1730:80: E501 line too long (98 > 79 characters)
checkdmarc.py:1735:80: E501 line too long (91 > 79 characters)
checkdmarc.py:1767:80: E501 line too long (97 > 79 characters)
checkdmarc.py:1772:80: E501 line too long (90 > 79 characters)
checkdmarc.py:1817:80: E501 line too long (83 > 79 characters)
checkdmarc.py:1831:80: E501 line too long (98 > 79 characters)
checkdmarc.py:1833:80: E501 line too long (96 > 79 characters)
checkdmarc.py:2083:80: E501 line too long (83 > 79 characters)
checkdmarc.py:2100:80: E501 line too long (82 > 79 characters)
checkdmarc.py:2137:80: E501 line too long (90 > 79 characters)
checkdmarc.py:2154:80: E501 line too long (92 > 79 characters)
checkdmarc.py:2217:80: E501 line too long (83 > 79 characters)
checkdmarc.py:2228:80: E501 line too long (85 > 79 characters)
checkdmarc.py:2301:80: E501 line too long (83 > 79 characters)
checkdmarc.py:2368:80: E501 line too long (85 > 79 characters)
checkdmarc.py:2389:80: E501 line too long (88 > 79 characters)

@stcz stcz requested a review from seanthegeek November 8, 2022 09:18
@seanthegeek seanthegeek merged commit 0ce9656 into domainaware:master Dec 18, 2022
seanthegeek added a commit that referenced this pull request Dec 20, 2022
- Detect non-trivial loops (PR [#88](#88))
- Raise a `SPFSyntaxError` exception when an IP address and IP version do not match (PR [#87](#87))
- Fix raising the `DMARCRecordNotFound` exception when a DMARC record does not exist (PR [#86](#86) closes issue [#72](#72))
- Add void lookup limit (PR [#85](#85))
- Add Support for User Defined DNS Resolver Object (PR [#83](#83))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants