flask-soc-site/host_lookup/spf_dmarc.py

10 lines
238 B
Python
Raw Normal View History

2024-08-29 21:03:36 +02:00
from checkdmarc.dmarc import check_dmarc
from checkdmarc.spf import check_spf
import validators
def lookup(host: str) -> tuple:
result_dmarc = check_dmarc(host)
result_spf = check_spf(host)
return (result_dmarc, result_spf)