santoru/shcheck

GitHub: santoru/shcheck

一款轻量级的Python脚本,用于快速检测并分析目标网站的HTTP安全标头配置情况。

Stars: 811 | Forks: 133

# shcheck - 安全标头检查

PyPI Pypi Updated Output on Facebook

## 检查目标网站的安全标头 我开发了这个工具来帮助我检查特定网站启用了哪些安全标头。 该工具非常简单,是几分钟编码的成果。 它只检查标头并打印一份报告,显示哪些已启用,哪些未启用。 我认为还有很多需要改进的地方,如果有人愿意提供帮助,我将不胜感激。 ## 如何运行: ### Pypi ``` pip3 install shcheck shcheck.py https://insecurity.blog ``` ### Docker 首先使用类似以下命令构建你的 docker 容器: `docker build -t shcheck .` 然后简单地运行你的 docker 容器,指定你想检查标头的网站,命令如下: `docker run -it --rm shcheck https://insecurity.blog` ### 从源代码运行 ``` git clone https://github.com/santoru/shcheck && cd shcheck ./shcheck.py https://insecurity.blog ``` ### 独立脚本 如果你想将 shcheck 作为独立脚本运行,只需从 `shcheck` 模块/文件夹中获取 `shcheck.py` 脚本并将其复制到任意位置。 ## 用法 ``` Usage: ./shcheck.py [options] Options: -h, --help show this help message and exit -p PORT, --port=PORT Set a custom port to connect to -c COOKIE_STRING, --cookie=COOKIE_STRING Set cookies for the request -a HEADER_STRING, --add-header=HEADER_STRING Add headers for the request e.g. 'Header: value' -d, --disable-ssl-check Disable SSL/TLS certificate validation -g, --use-get-method Use GET method instead HEAD method -j, --json-output Print the output in JSON format -i, --information Display information headers -x, --caching Display caching headers -k, --deprecated Display deprecated headers --no-follow Do not follow HTTP redirects --proxy=PROXY_URL Set a proxy (Ex: http://127.0.0.1:8080) --hfile=PATH_TO_FILE Load a list of hosts from a flat file --colours=COLOURS Set up a colour profile [dark/light/none] --colors=COLOURS Alias for colours for US English ```
标签:CSP检测, Docker, HTTPS, HTTP头部检测, Python, Web安全, 二进制发布, 安全基线检查, 安全防御评估, 密码管理, 开源工具, 插件系统, 无后门, 网站安全, 蓝队分析, 请求拦截, 逆向工具