Skip to content

中文翻译:<trailofbits/twa> 小小网络审查员 ❤️ 校对 ✅

Notifications You must be signed in to change notification settings

chinanf-boy/twa-zh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

trailofbits/twa explain translate-svg

「 小小网络,审查员(bash) 」

中文 | english


校对 ✅

翻译的原文 与日期 最新更新 更多
commit ⏰ 2018-11-10 last 中文翻译

贡献

欢迎 👏 勘误/校对/更新贡献 😊 具体贡献请看

生活

If help, buy me coffee —— 营养跟不上了,给我来瓶营养快线吧! 💰


twa

Build Status Docker Build Status

审计,大脾气 (网络)

A tiny web auditor ==> twa

用法

依赖

你需要bash4,curl,dig,和nc,以及一个还行的 POSIX 系统.

审计

# 审核网站。
$ twa google.com
> FAIL(google.com): TWA-0102: HTTP redirects to HTTP (not secure)
> FAIL(google.com): TWA-0205: Strict-Transport-Security missing
> MEH(google.com): TWA-0206: X-Frame-Options is 'sameorigin', consider 'deny'
> FAIL(google.com): TWA-0209: X-Content-Type-Options missing
> PASS(google.com): X-XSS-Protection specifies mode=block
> FAIL(google.com): TWA-0214: Referrer-Policy missing
> FAIL(google.com): TWA-0219: Content-Security-Policy missing
> FAIL(google.com): TWA-0220: Feature-Policy missing
> PASS(google.com): Site sends 'Server', but probably only a vendor ID: gws
> PASS(google.com): Site doesn't send 'X-Powered-By'
> PASS(google.com): Site doesn't send 'Via'
> PASS(google.com): Site doesn't send 'X-AspNet-Version'
> PASS(google.com): Site doesn't send 'X-AspNetMvc-Version'
> PASS(google.com): No SCM repository at: http://google.com/.git/HEAD
> PASS(google.com): No SCM repository at: http://google.com/.hg/store/00manifest.i
> PASS(google.com): No SCM repository at: http://google.com/.svn/entries
> PASS(google.com): No environment file at: http://google.com/.env
> PASS(google.com): No environment file at: http://google.com/.dockerenv

# 审核网站,并且详细。
$ twa -v google.com

# 审核站点及其www子域。
$ twa -w google.com

twa一次只搞一个域,并且在使用-w时,多个域只审核一次。如果您需要审核多个域,请多次运行它.

每个结果行包含一个测试结果,如下所示:

TYPE(domain): explanation

这里的TYPEPASS,MEH,FAIL,UNK,SKIP,和FATAL中的一个:

  • PASS:测试通过,带有绚丽的色彩.
  • MEH:测试通过了,但有一件或多件事情可以改进.
  • FAIL:测试失败,应该修复.
  • UNK:服务器给了我们一些我们不理解的东西.
  • SKIP:服务器给了我们一些我们理解的东西,但我们还没有处理.
  • FATAL:一个非常重要的测试失败了,应立即修复.

如果TYPE是不好的(即MEH,FAIL, 要么FATAL),解释以格式参考代码TWA-XXYY为前缀,这里的XX是结果发生的阶段,和YY是结果的唯一标识符.

评分

twa可以和tscore一起使用,它提供了一个基本的评分机制:

$ twa google.com | tscore
> 35 9 1 6 0 0 0

分数格式逐个的意思是score npasses nmehs nfailures nunknowns nskips totally_screwed,所以你可以这样做:

$ read -r score npasses nmehs nfailures nunknowns nskips totally_screwed < <(twa google.com | tscore)
$ echo "score: ${score}"

twa,这个tscore是可选的。您可以通过编辑,来更改其选项(即其分数权重).

Docker

twa可以使用轻型(29MB)Alpine Docker 容器.

要从 Docker Hub 安装它:

$ docker pull trailofbits/twa

或者,手动构建它:

$ git clone https://github.com/trailofbits/twa.git
$ cd twa
$ docker build -t twa .
$ docker run -it twa:latest -vw google.com

贡献

看看贡献指南.

About

中文翻译:<trailofbits/twa> 小小网络审查员 ❤️ 校对 ✅

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages