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

IndexError caused by malformed DNS packet #39

Open
readycool opened this issue Aug 27, 2022 · 0 comments
Open

IndexError caused by malformed DNS packet #39

readycool opened this issue Aug 27, 2022 · 0 comments

Comments

@readycool
Copy link

Stack trace:

File "/opt/homebrew/lib/python3.10/site-packages/spf.py", line 595, in check
  spf = self.dns_spf(self.d)
File "/opt/homebrew/lib/python3.10/site-packages/spf.py", line 1164, in dns_spf
  a = [t for t in self.dns_txt(domain) if RE_SPF.match(t)]
File "/opt/homebrew/lib/python3.10/site-packages/spf.py", line 1219, in dns_txt
  if isinstance(a[0],bytes):
IndexError: list index out of range

Steps to reproduce:

- Python 3.10.4
- dnspython 2.2.1
- pyspf 2.0.14

python spf.py 0.0.0.0 [email protected] openprocurement.io

DiG 9.10.6 output:

dig openprocurement.io TXT
;; Warning: Message parser reports malformed message packet.
;; WARNING: Message has 11 extra bytes at end
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

No branches or pull requests

1 participant