MoinQ:

1. qmail/SPF/SPF2IP

Python module to get IP addresses from an SPF record https://pypi.org/project/SPF2IP/

pip install

$ pip install SPF2IP
Collecting SPF2IP
  Downloading https://files.pythonhosted.org/packages/df/b1/9d537d4d910e4b20474a6107f3fba3470846a7b309a515926da0928d5db8/SPF2IP-1.0.5.tar.gz
Collecting dnspython>=1.13.0 (from SPF2IP)
  Using cached https://files.pythonhosted.org/packages/ec/d3/3aa0e7213ef72b8585747aa0e271a9523e713813b9a20177ebe1e939deb0/dnspython-1.16.0-py2.py3-none-any.whl
Collecting ipaddress (from SPF2IP)
  Downloading https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl
Building wheels for collected packages: SPF2IP
  Running setup.py bdist_wheel for SPF2IP ... done
  Stored in directory: /home/tmaeno/.cache/pip/wheels/4b/49/bc/7b3166699639b35c4dbbb28c6e847656b54e2df8a197148766
Successfully built SPF2IP
Installing collected packages: dnspython, ipaddress, SPF2IP
Successfully installed SPF2IP-1.0.5 dnspython-1.16.0 ipaddress-1.0.23

COMMON USAGE

Command line:

SPF2IP [-h] --domain DOMAIN [--ip-version {4,6}]

Module:

from SPF2IP import SPF2IP
lookup = SPF2IP('example.org')

lookup.IPArray('4')   # Specify the IP version which you would like listed

MoinQ: qmail/SPF/SPF2IP (last edited 2022-01-26 06:29:37 by ToshinoriMaeno)