f8al / phrenology

A pure python tool for examining your HEADers
GNU General Public License v3.0
3 stars 1 forks source link

add command line option to enable json output of discovered vs missing headers #4

Open f8al opened 1 month ago

f8al commented 1 month ago

need a command line option for having the output be a json object with the domain, present headers, and missing headers

structure should be close to the below

{"https://www.google.com/": {"present": {"X-Frame-Options": "SAMEORIGIN", "X-Content-Type-Options": "nosniff", "Strict-Transport-Security": "max-age=31536000"}, "missing": ["Content-Security-Policy", "Referrer-Policy", "Permissions-Policy", "Cross-Origin-Embedder-Policy", "Cross-Origin-Resource-Policy", "Cross-Origin-Opener-Policy"]}}

dataminion commented 1 month ago

ooo this is a cool feature actually because it is technically a different type of output

dataminion commented 1 month ago

I would suggest we do something like this

{
    site,
    scan_date:
    outcome:
        {
        expected,
        missing,
        present,
        }
}

that would make the object easier to key into take advantage of that date object and account for our three existing outcomes self.does_exist = {} self.not_exist = {} self.more_exist = {}