Mayankkumar-2067/email-header-analyzer ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python tool that takes raw email headers from a text file and analyzes them for signs of spoofing, phishing, and mail flow problems.
I want it to read the header text, pull out things like From, Return Path, SPF, DKIM, DMARC, and the Received chain, then flag anything suspicious in a clear way. If the sender looks fake, the return path does not match, or authentication checks fail, it should call that out in the results. Please make it useful for a SOC analyst, so the output should be easy to read and also save a JSON report with the main fields and any warnings found.
It should be a command line script that I can run locally, and if you need to check current parsing or email header handling details online, go ahead and do that. Keep it lightweight and practical, with good error handling for messy real world headers.
Are you gonna build this?
make sure you review the code using coderabbit