-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
It would be a lot better and user friendly to replace the main function with the following:
def main():
file_path = input("Enter the path to the domain list file: ").strip()
try:
with open(file_path, "r", encoding="utf-8") as file:
domains = [line.strip() for line in file if line.strip()]
except FileNotFoundError:
print(f"Error: File '{file_path}' not found.")
return
except Exception as e:
print(f"Error reading file: {e}")
return
results = {}
for domain in domains:
dmarc_info = check_dmarc_policy(domain)
spf_record = check_spf_record(domain)
log_domain_scan(domain, dmarc_info["policy"], spf_record) # Adjust logging
full_dmarc_record = dmarc_info["full_record"] if dmarc_info else None
results[domain] = {
"DMARC": dmarc_info["policy"],
"SPF": spf_record,
"Full DMARC": full_dmarc_record,
}
Metadata
Metadata
Assignees
Labels
No labels