This is a simple Python script that checks for security headers in a given URL and returns the result.
This script requires Python 3.x and the requests
module to be installed.
python3 secheader.py https://example.com
This will check for all the security headers as well as the Strict-Transport-Security
, Permissions-Policy
, and Server
headers for the specified URL.
The script will return a table showing the status of each header. A green color means that the header is present, while a red color means that the header is not present.
The script checks for the following security headers:
- X-XSS-Protection
- X-Content-Type-Options
- Referrer-Policy
- Content-Security-Policy
- X-Frame-Options
- Strict-Transport-Security
- Permissions-Policy
- Server
This script is released under the MIT License. See the LICENSE file for details.