Comments (13)
Thanks. I can confirm the problem and I've added a test that replicates it.
from pyspf.
Would like to have a "quantum" mode for i='list' that both matches and does not match. Right now, it never matches, which is a useful heuristic.
from pyspf.
I guess not crashing would be a nice first step.
from pyspf.
It is broken in python3. The problem is that ipaddress has ip_network whereas ipaddr (py2) has IPNetwork. Should we ditch or fork python2 at this point?
Fedora has dropped python2-ipaddress and python2-ipaddr as of Fedora 32.
from pyspf.
Debian has dropped them as well. I have no problem at all with dropping support for python2. It's no longer supported by the Python developers, so I don't think we need to do so for future development.
from pyspf.
I think I will drop support for ipaddr. If you must run py2, then python2-ipaddress can be installed from older versions of Fedora. EL6 dies in Nov 2020. EL7 has python3.6. So python3.6 is my new minimum target. But there is no point in throwing away already existing py2 compatibility without a good reason. Therefore, I will drop support for ipaddr.
from pyspf.
Does ipaddress on python2 work? I haven't tried it with pyspf, but in other contexts I have run into huge UTF-8 issues because ipaddress assumes a UTF-8 environment that python2 doesn't reliably provide.
from pyspf.
A hacked ipaddress on python2 works. Such as released on Fedora. For instance, the hacked ipaddress provides a Bytes class, which I import on python2.
from pyspf.
I pushed dropping ipaddr support to master. This fixes this issue for python3. Python2 and ipaddr support can continue in another branch as suggested by @kitterma.
from pyspf.
OK. As long as it works, I have no objection to dropping ipaddr.
from pyspf.
At this point, hacking on ipaddress for python2 would be easier than try to match the not quite the same APIs.
from pyspf.
@shay-cyesec The list feature is not a full implementation, but a quick heuristic that works by always not matching and listing the ips not matched. A full implementation would keep a list for each result, and make recursive calls for both matching and not matching.
from pyspf.
FWIW, tests still fail on Python 3.7 and 3.8 for me with:
File "/home/evgeni/Devel/pyspf/.tox/py38/lib/python3.8/site-packages/spf.py", line 576, in spf.query.check
Failed example:
r.check()
Expected:
('fail', 550, 'SPF fail - not authorized')
Got:
('none', 250, '')
from pyspf.
Related Issues (20)
- NameError: name "strict" is not defined HOT 5
- Add special case for +all SPF ? HOT 17
- RST vs MD HOT 5
- http://openspf.net -> http://www.open-spf.org/ HOT 6
- dnspython and CNAME answers HOT 7
- Provide detailed explanation for SPF result, for "Received-SPF" header HOT 2
- Version number/branches for python3/ipaddress only releases HOT 2
- Using dnspython breaks relative lookups with search path HOT 1
- split() requires a non-empty pattern match HOT 17
- Allow custom DNS server HOT 4
- dnspython vs python3 dns dns.resolver.resolve lifetime arg bug HOT 1
- SPF with redirect problem HOT 1
- Passing lowercase qtype to DNSLookup_dnspython() always results in empty list HOT 3
- vaidating an spf record HOT 2
- Example app illustrating legit use of +all
- Detect a non-trivial subset of AlwaysPass policies HOT 1
- PEP8 coding style HOT 2
- IndexError caused by malformed DNS packet
- Problems with ipv6 queries and void lookups HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyspf.