Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
h2t — h2t(HTTP 强化工具)扫描网站并建议应用安全头 | Kitploit
工具/GitHubGitHub/gildasio/h2t
防御工具漏洞扫描器配置审计Web安全
GitHubgildasio/h2t

h2t

h2t(HTTP 强化工具)扫描网站并建议应用安全头

查看仓库网站
411367个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

h2t - HTTP 强化工具

描述

h2t 是一个简单的工具,用于帮助系统管理员强化其网站。

截至目前,h2t 可以检查网站头部,并推荐如何改进。

依赖项

  • Python 3
  • colorama
  • requests

安装

root@kitploit:~
$ git clone https://github.com/gildasio/h2t
$ cd h2t
$ pip install -r requirements.txt
$ ./h2t.py -h

……或者通过 Docker 方式:

root@kitploit:~
$ git clone https://github.com/gildasio/h2t
$ cd h2t
$ docker build -t h2t .
$ docker run --rm h2t -h

你也可以将 alias h2t='docker run --rm h2t' 放入某个文件(例如 ~/.bash_aliases),然后像这样运行:

root@kitploit:~
$ h2t -h

用法

h2t 包含子命令:list 和 scan。

root@kitploit:~
$ ./h2t.py -h
usage: h2t.py [-h] {list,l,scan,s} ...

h2t - HTTP Hardening Tool

positional arguments:
  {list,l,scan,s}  sub-command help
    list (l)       show a list of available headers in h2t catalog (that can
                   be used in scan subcommand -H option)
    scan (s)       scan url to hardening headers

optional arguments:
  -h, --help       show this help message and exit

List 子命令

list 子命令列出 h2t 中收录的所有头部,并可以显示有关信息,如描述、更多信息的链接以及操作方法。

root@kitploit:~
$ ./h2t.py list -h
usage: h2t.py list [-h] [-p PRINT [PRINT ...]] [-B]
                   [-a | -H HEADERS [HEADERS ...]]

optional arguments:
  -h, --help            show this help message and exit
  -p PRINT [PRINT ...], --print PRINT [PRINT ...]
                        a list of additional information about the headers to
                        print. For now there are two options: description and
                        refs (you can use either or both)
  -B, --no-banner       don't print the h2t banner
  -a, --all             list all available headers [default]
  -H HEADERS [HEADERS ...], --headers HEADERS [HEADERS ...]
                        a list of headers to look for in the h2t catalog

Scan 子命令

scan 子命令对网站执行扫描,查看其头部。

root@kitploit:~
$ ./h2t.py scan -h
usage: h2t.py scan [-h] [-v] [-a] [-g] [-b] [-H HEADERS [HEADERS ...]]
                   [-p PRINT [PRINT ...]]
                   [-i IGNORE_HEADERS [IGNORE_HEADERS ...]] [-B] [-E] [-n]
                   [-u USER_AGENT] [-r | -s]
                   url

positional arguments:
  url                   url to look for

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity: -v print response headers,
                        -vv print response and request headers
  -a, --all             scan all cataloged headers [default]
  -g, --good            scan good headers only
  -b, --bad             scan bad headers only
  -H HEADERS [HEADERS ...], --headers HEADERS [HEADERS ...]
                        scan only these headers (see available in list sub-
                        command)
  -p PRINT [PRINT ...], --print PRINT [PRINT ...]
                        a list of additional information about the headers to
                        print. For now there are two options: description and
                        refs (you can use either or both)
  -i IGNORE_HEADERS [IGNORE_HEADERS ...], --ignore-headers IGNORE_HEADERS [IGNORE_HEADERS ...]
                        a list of headers to ignore in the results
  -B, --no-banner       don't print the h2t banner
  -E, --no-explanation  don't print the h2t output explanation
  -o {normal,csv,json}, --output {normal,csv,json}
                        choose which output format to use (available: normal,
                        csv, json)
  -n, --no-redirect     don't follow http redirects
  -u USER_AGENT, --user-agent USER_AGENT
                        set user agent to scan request
  -k, --insecure        don't verify SSL certificate as valid
  -r, --recommendation  output only recommendations [default]
  -s, --status          output actual status (eg: existent headers only)

输出

目前输出仅为普通模式。理解如下:

  • [+] 红色头部是糟糕的头部,会在你的网站上留下漏洞或可能显示大量信息。我们建议修复它。
  • [+] 黄色头部是良好的头部,但尚未应用于你的网站。我们建议应用它们。
  • [-] 绿色头部是良好的头部,已经用于你的网站。使用 -s 标志时会显示。

示例:

h2t 针对 hack.me

  • Cookie HTTP Only 应该被应用
  • Cookie over SSL/TLS 应该被应用
  • Server 头部应该被移除
  • Referrer-Policy 应该被应用
  • X-Frame-Options 已经使用,无需处理
  • X-XSS-Protection 已经使用,无需处理

截图

列出 h2t 目录

h2t 目录

从文件扫描

h2t 针对我的网站

扫描 URL

h2t 针对 hackme

详细扫描

h2t 针对我的网站(详细模式)

头部信息

h2t 针对我的网站并打印头部信息

贡献

关于贡献指南,请查看 CONTRIBUTING

下载工具