Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
slither — Solidity 和 Vyper 的静态分析器 | Kitploit
工具/GitHubGitHub/crytic/slither
静态分析漏洞分析代码分析
GitHubcrytic/slither

slither

Solidity 和 Vyper 的静态分析器

查看仓库网站
6.3k1.1k545天前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
# [Slither,智能合约静态分析器](https://crytic.github.io/slither/slither.html)

<img src="https://assets.kitploit.com/production/public/readmes/2943/62b8c109c585043091c50668ec219aa530aa6d589d7cda02181bf209249f5205.png" alt="Slither Static Analysis Framework Logo" width="500" />

[![Build Status](https://img.shields.io/github/actions/workflow/status/crytic/slither/ci.yml?branch=master)](https://github.com/crytic/slither/actions?query=workflow%3ACI)
![PyPI](https://img.shields.io/pypi/v/slither-analyzer?logo=python&logoColor=white&label=slither-analyzer)
[![Slither - Read the Docs](https://img.shields.io/badge/Slither-Read_the_Docs-2ea44f)](https://crytic.github.io/slither/slither.html)
[![Slither - Wiki](https://img.shields.io/badge/Slither-Wiki-2ea44f)](https://github.com/crytic/slither/wiki/SlithIR)

> 加入 Empire Hacking Slack
>
> [![Slack Status](https://slack.empirehacking.nyc/badge.svg)](https://slack.empirehacking.nyc/)
> > _- 讨论与支持_

**Slither** 是一个用 Python3 编写的 Solidity 和 Vyper 静态分析框架。它运行一套漏洞检测器,打印合约细节的可视化信息,并提供 API 以轻松编写自定义分析。Slither 使开发者能够发现漏洞,增强代码理解,并快速原型化自定义分析。

* [功能](#features)
* [使用](#usage)
* [安装方法](#how-to-install)
  * [使用 uv(推荐)](#using-uv-recommended)
  * [使用 Pip](#using-pip)
  * [使用 Git](#using-git-development)
  * [使用 Docker](#using-docker)
  * [集成](#integration)
* [Detectors](#detectors)
* [Printers](#printers)
  * [快速审查 Printers](#quick-review-printers)
  * [深度审查 Printers](#in-depth-review-printers)
* [工具](#tools)
* [API 文档](#api-documentation)
* [获取帮助](#getting-help)
* [常见问题](#faq)
* [许可证](#license)
* [出版物](#publications)
  * [Trail of Bits 出版物](#trail-of-bits-publication)
  * [外部出版物](#external-publications)

## 功能

* 以低误报率检测易受攻击的 Solidity 代码(查看[战利品](https://github.com/crytic/slither/blob/master/trophies.md)列表)
* 识别源代码中错误条件发生的位置
* 轻松集成到持续集成和 Hardhat/Foundry 构建中
* 内置的 'printers' 快速报告关键合约信息
* 检测器 API,可使用 Python 编写自定义分析
* 能够分析使用 Solidity >= 0.4 编写的合约
* 中间表示([SlithIR](https://github.com/crytic/slither/wiki/SlithIR))实现简单、高精度的分析
* 正确解析 99.9% 的公开 Solidity 代码
* 每个合约的平均执行时间不到 1 秒
* 在 [CI](https://github.com/marketplace/actions/slither-action) 中与 Github 的代码扫描集成
* 支持 Vyper 智能合约

## 使用

在 Hardhat/Foundry/Dapp/Brownie 应用程序上运行 Slither:```console
slither .
```
如果你的项目有依赖项,这是首选选项,因为 Slither 依赖于底层编译框架来编译源代码。

不过,你也可以在单个不导入依赖的文件上运行 Slither:```console
slither tests/uninitialized.sol
```
## 如何安装

> **注意**
> Slither 需要 Python 3.10+。
如果您**不**打算使用 [支持的编译框架](https://github.com/crytic/crytic-compile),则需要 [solc](https://github.com/ethereum/solidity/) 即 Solidity 编译器;我们推荐使用 [solc-select](https://github.com/crytic/solc-select) 来方便地在不同 solc 版本间切换。

### 使用 uv(推荐)

[uv](https://github.com/astral-sh/uv) 是一个快速的 Python 包管理器,速度比 pip 快 10 到 100 倍。```console
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install slither as a tool
uv tool install slither-analyzer

# Or run slither without installation
uvx --from slither-analyzer slither <target>
```
升级:```console
uv tool upgrade slither-analyzer
```
### 使用 Pip```console
python3 -m pip install slither-analyzer
```
要升级:```console
python3 -m pip install --upgrade slither-analyzer
```
### 使用 Brew```console
brew install slither-analyzer
```
### 使用 Git(开发)```bash
git clone https://github.com/crytic/slither.git && cd slither

# Install as editable for development
uv tool install -e .

# Or use uv run for testing without installation
uv run slither <target>
```
The `-e` flag installs in editable mode, meaning changes to the source code are immediately reflected without reinstalling.

### 使用 Docker

使用 [`eth-security-toolbox`](https://github.com/crytic/eth-security-toolbox/) Docker 镜像。它在一个镜像中包含了我们所有的安全工具和每个主要版本的 Solidity。`/home/share` 将被挂载到容器内的 `/share`。```bash
docker pull trailofbits/eth-security-toolbox
```
为了在容器中共享一个目录:```bash
docker run -it -v /home/share:/share trailofbits/eth-security-toolbox
```
### 集成

* 对于 GitHub Action 集成,请使用 [slither-action](https://github.com/marketplace/actions/slither-action)。
* 对于 pre-commit 集成,请使用(将 `$GIT_TAG` 替换为实际标签)  ```YAML
  - repo: https://github.com/crytic/slither
    rev: $GIT_TAG
    hooks:
      - id: slither
  ```
* 要生成Markdown报告,使用 `slither [target] --checklist`。
* 要生成带有GitHub源代码高亮的Markdown报告,使用 `slither [target] --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/`(替换 `ORG`、`REPO`、`COMMIT`)

## 检测器

编号 | 检测器 | 检测内容 | 影响 | 置信度
--- | --- | --- | --- | ---
1 | `abiencoderv2-array` | [存储型 abiencoderv2 数组](https://github.com/crytic/slither/wiki/Detector-Documentation#storage-abiencoderv2-array) | 高 | 高
2 | `arbitrary-send-erc20` | [transferFrom 使用任意的 `from`](https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom) | 高 | 高
3 | `array-by-reference` | [按值修改存储数组](https://github.com/crytic/slither/wiki/Detector-Documentation#modifying-storage-array-by-value) | 高 | 高
4 | `encode-packed-collision` | [ABI encodePacked 碰撞](https://github.com/crytic/slither/wiki/Detector-Documentation#abi-encodePacked-collision) | 高 | 高
5 | `incorrect-shift` | [移位指令中参数顺序错误。](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-shift-in-assembly) | 高 | 高
6 | `multiple-constructors` | [多个构造函数模式](https://github.com/crytic/slither/wiki/Detector-Documentation#multiple-constructor-schemes) | 高 | 高
7 | `name-reused` | [合约名称被重复使用](https://github.com/crytic/slither/wiki/Detector-Documentation#name-reused) | 高 | 高
8 | `protected-vars` | [检测到未受保护的变量](https://github.com/crytic/slither/wiki/Detector-Documentation#protected-variables) | 高 | 高
9 | `public-mappings-nested` | [具有嵌套变量的公共映射](https://github.com/crytic/slither/wiki/Detector-Documentation#public-mappings-with-nested-variables) | 高 | 高
10 | `rtlo` | [使用了从右到左覆盖控制字符](https://github.com/crytic/slither/wiki/Detector-Documentation#right-to-left-override-character) | 高 | 高
11 | `shadowing-state` | [状态变量遮蔽](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing) | 高 | 高
12 | `suicidal` | [允许任何人销毁合约的函数](https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal) | 高 | 高
13 | `uninitialized-state` | [未初始化的状态变量](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables) | 高 | 高
14 | `uninitialized-storage` | [未初始化的存储变量](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-storage-variables) | 高 | 高
15 | `unprotected-upgrade` | [未受保护的可升级合约](https://github.com/crytic/slither/wiki/Detector-Documentation#unprotected-upgradeable-contract) | 高 | 高
16 | `arbitrary-send-erc20-permit` | [transferFrom 使用任意的 from 与 permit](https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom-used-with-permit) | 高 | 中
17 | `arbitrary-send-eth` | [将以太币发送到任意目标的函数](https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations) | 高 | 中
18 | `controlled-array-length` | [受污染的数组长度赋值](https://github.com/crytic/slither/wiki/Detector-Documentation#array-length-assignment) | 高 | 中
19 | `controlled-delegatecall` | [受控的 delegatecall 目标](https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall) | 高 | 中
20 | `delegatecall-loop` | [在循环中使用 `delegatecall` 的可支付函数](https://github.com/crytic/slither/wiki/Detector-Documentation/#payable-functions-using-delegatecall-inside-a-loop) | 高 | 中
21 | `incorrect-exp` | [不正确的指数运算](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-exponentiation) | 高 | 中
22 | `incorrect-return` | [在汇编模式下错误地使用了 `return`。](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-return-in-assembly) | 高 | 中
23 | `msg-value-loop` | [循环中的 msg.value](https://github.com/crytic/slither/wiki/Detector-Documentation/#msgvalue-inside-a-loop) | 高 | 中
24 | `reentrancy-eth` | [重入漏洞(窃取以太币)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities) | 高 | 中
25 | `reentrancy-balance` | [导致余额检查过时的重入漏洞](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4) | 高 | 中
26 | `return-leave` | [使用 `return` 代替了 `leave`。](https://github.com/crytic/slither/wiki/Detector-Documentation#return-instead-of-leave-in-assembly) | 高 | 中
27 | `storage-array` | [有符号存储整数数组编译器错误](https://github.com/crytic/slither/wiki/Detector-Documentation#storage-signed-integer-array) | 高 | 中
28 | `unchecked-transfer` | [未检查的代币转账](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-transfer) | 高 | 中
29 | `weak-prng` | [弱 PRNG](https://github.com/crytic/slither/wiki/Detector-Documentation#weak-PRNG) | 高 | 中
30 | `domain-separator-collision` | [检测到 ERC20 代币中函数的签名与 EIP-2612 的 DOMAIN_SEPARATOR() 发生碰撞](https://github.com/crytic/slither/wiki/Detector-Documentation#domain-separator-collision) | 中 | 高
31 | `enum-conversion` | [检测危险的枚举类型转换](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-enum-conversion) | 中 | 高
32 | `erc20-interface` | [不正确的 ERC20 接口](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface) | 中 | 高
33 | `erc721-interface` | [不正确的 ERC721 接口](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface) | 中 | 高
34 | `incorrect-equality` | [危险的严格相等比较](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities) | 中 | 高
35 | `locked-ether` | [锁定以太币的合约](https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether) | 中 | 高
36 | `mapping-deletion` | [对包含结构的映射进行删除操作](https://github.com/crytic/slither/wiki/Detector-Documentation#deletion-on-mapping-containing-a-structure) | 中 | 高
37 | `pyth-deprecated-functions` | [检测 Pyth 已弃用的函数](https://github.com/crytic/slither/wiki/Detector-Documentation#pyth-deprecated-functions) | 中 | 高
38 | `pyth-unchecked-confidence` | [检测到未检查 Pyth 价格的置信度级别](https://github.com/crytic/slither/wiki/Detector-Documentation#pyth-unchecked-confidence-level) | 中 | 高
39 | `pyth-unchecked-publishtime` | [检测到未检查 Pyth 价格的 publishTime](https://github.com/crytic/slither/wiki/Detector-Documentation#pyth-unchecked-publishtime) | 中 | 高
40 | `shadowing-abstract` | [来自抽象合约的状态变量遮蔽](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts) | 中 | 高
41 | `tautological-compare` | [变量与自身进行比较,根据比较类型总是返回 true 或 false](https://github.com/crytic/slither/wiki/Detector-Documentation#tautological-compare) | 中 | 高
42 | `tautology` | [永真或矛盾](https://github.com/crytic/slither/wiki/Detector-Documentation#tautology-or-contradiction) | 中 | 高
43 | `write-after-write` | [未使用的写入](https://github.com/crytic/slither/wiki/Detector-Documentation#write-after-write) | 中 | 高
44 | `boolean-cst` | [布尔常量的误用](https://github.com/crytic/slither/wiki/Detector-Documentation#misuse-of-a-boolean-constant) | 中 | 中
45 | `chronicle-unchecked-price` | [检测到未检查 Chronicle 价格。](https://github.com/crytic/slither/wiki/Detector-Documentation#chronicle-unchecked-price) | 中 | 中
46 | `constant-function-asm` | [使用汇编代码的常量函数](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-using-assembly-code) | 中 | 中
47 | `constant-function-state` | [改变状态的常量函数](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state) | 中 | 中
48 | `divide-before-multiply` | [不精确的算术运算顺序](https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply) | 中 | 中
49 | `gelato-unprotected-randomness` | [在未受保护的函数中调用 `_requestRandomness`](https://github.com/crytic/slither/wiki/Detector-Documentation#gelato-unprotected-randomness) | 中 | 中
50 | `out-of-order-retryable` | [无序的可重试交易](https://github.com/crytic/slither/wiki/Detector-Documentation#out-of-order-retryable-transactions) | 中 | 中
51 | `reentrancy-no-eth` | [重入漏洞(未窃取以太币)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-1) | 中 | 中
52 | `reused-constructor` | [重复使用的基构造函数](https://github.com/crytic/slither/wiki/Detector-Documentation#reused-base-constructors) | 中 | 中
53 | `tx-origin` | [危险的 `tx.origin` 用法](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin) | 中 | 中
54 | `unchecked-lowlevel` | [未检查的低级调用](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level-calls) | 中 | 中
55 | `unchecked-send` | [未检查的 send](https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-send) | 中 | 中
56 | `uninitialized-local` | [未初始化的局部变量](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables) | 中 | 中
57 | `unused-return` | [未使用的返回值](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return) | 中 | 中
58 | `chainlink-feed-registry` | [检测到使用了 Chainlink feed registry](https://github.com/crytic/slither/wiki/Detector-Documentation#chainlink-feed-registry-usage) | 低 | 高
59 | `incorrect-modifier` | [可能返回默认值的修饰符](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-modifier) | 低 | 高
60 | `optimism-deprecation` | [检测到使用了已弃用的 Optimism 预部署或函数。](https://github.com/crytic/slither/wiki/Detector-Documentation#optimism-deprecated-predeploy-or-function) | 低 | 高
61 | `shadowing-builtin` | [内建符号遮蔽](https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing) | 低 | 高
62 | `shadowing-local` | [局部变量遮蔽](https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing) | 低 | 高
63 | `uninitialized-fptr-cst` | [构造函数中未初始化的函数指针调用](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-function-pointers-in-constructors) | 低 | 高
64 | `variable-scope` | [在声明之前使用的局部变量](https://github.com/crytic/slither/wiki/Detector-Documentation#pre-declaration-usage-of-local-variables) | 低 | 高
65 | `void-cst` | [构造函数调用未实现](https://github.com/crytic/slither/wiki/Detector-Documentation#void-constructor) | 低 | 高
66 | `calls-loop` | [循环中的多次调用](https://github.com/crytic/slither/wiki/Detector-Documentation/#calls-inside-a-loop) | 低 | 中
67 | `events-access` | [缺少事件-访问控制](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-access-control) | 低 | 中
68 | `events-maths` | [缺少事件-算术运算](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-arithmetic) | 低 | 中
69 | `incorrect-unary` | [危险的一元表达式](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-unary-expressions) | 低 | 中
70 | `missing-zero-check` | [缺少零地址验证](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-zero-address-validation) | 低 | 中
71 | `reentrancy-benign` | [良性重入漏洞](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-2) | 低 | 中
72 | `reentrancy-events` | [导致事件乱序的重入漏洞](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-3) | 低 | 中
73 | `return-bomb` | [低级被调用者可能意外消耗所有调用者的 gas。](https://github.com/crytic/slither/wiki/Detector-Documentation#return-bomb) | 低 | 中
74 | `timestamp` | [危险的 `block.timestamp` 用法](https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp) | 低 | 中
75 | `assembly` | [汇编代码使用](https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage) | 信息 | 高
76 | `assert-state-change` | [断言状态变更](https://github.com/crytic/slither/wiki/Detector-Documentation#assert-state-change) | 信息 | 高
77 | `boolean-equal` | [与布尔常量比较](https://github.com/crytic/slither/wiki/Detector-Documentation#boolean-equality) | 信息 | 高
78 | `cyclomatic-complexity` | [检测圈复杂度高(>11)的函数](https://github.com/crytic/slither/wiki/Detector-Documentation#cyclomatic-complexity) | 信息 | 高
79 | `deprecated-standards` | [已弃用的 Solidity 标准](https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards) | 信息 | 高
80 | `erc20-indexed` | [未索引的 ERC20 事件参数](https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters) | 信息 | 高
81 | `function-init-state` | [函数初始化状态变量](https://github.com/crytic/slither/wiki/Detector-Documentation#function-initializing-state) | 信息 | 高
82 | `incorrect-using-for` | [检测 using-for 语句中,给定库没有函数匹配给定类型](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-usage-of-using-for-statement) | 信息 | 高
83 | `low-level-calls` | [低级调用](https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls) | 信息 | 高
84 | `missing-inheritance` | [缺少继承](https://github.com/crytic/slither/wiki/Detector-Documentation#missing-inheritance) | 信息 | 高
85 | `naming-convention` | [符合 Solidity 命名约定](https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions) | 信息 | 高
86 | `pragma` | [使用了不同的 pragma 指令](https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used) | 信息 | 高
87 | `redundant-statements` | [冗余语句](https://github.com/crytic/slither/wiki/Detector-Documentation#redundant-statements) | 信息 | 高
88 | `solc-version` | [不正确的 Solidity 版本](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity) | 信息 | 高
89 | `unimplemented-functions` | [未实现的函数](https://github.com/crytic/slither/wiki/Detector-Documentation#unimplemented-functions) | 信息 | 高
90 | `unindexed-event-address` | [包含地址参数但无索引参数的事件](https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-event-address-parameters) | 信息 | 高
91 | `unused-state` | [未使用的状态变量](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variable) | 信息 | 高
92 | `costly-loop` | [循环中的昂贵操作](https://github.com/crytic/slither/wiki/Detector-Documentation#costly-operations-inside-a-loop) | 信息 | 中
93 | `dead-code` | [未使用的函数](https://github.com/crytic/slither/wiki/Detector-Documentation#dead-code) | 信息 | 中
94 | `reentrancy-unlimited-gas` | [通过 send 和 transfer 的重入漏洞](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4) | 信息 | 中
95 | `too-many-digits` | [符合数值记法最佳实践](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | 信息 | 中
96 | `cache-array-length` | [检测在循环条件中使用某些存储数组的 `length` 成员且未修改它的 `for` 循环。](https://github.com/crytic/slither/wiki/Detector-Documentation#cache-array-length) | 优化 | 高
97 | `constable-states` | [可声明为常量的状态变量](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | 优化 | 高
98 | `external-function` | [可声明为 external 的 public 函数](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external) | 优化 | 高
99 | `immutable-states` | [可声明为 immutable 的状态变量](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-immutable) | 优化 | 高
100 | `var-read-using-this` | [合约使用 `this` 读取自身的变量](https://github.com/crytic/slither/wiki/Detector-Documentation#public-variable-read-in-external-context) | 优化 | 高

更多信息,请参见:

* [检测器文档](https://github.com/crytic/slither/wiki/Detector-Documentation) 了解每个检测器的详情
* [检测选择](https://github.com/crytic/slither/wiki/Usage#detector-selection) 仅运行选定的检测器。默认情况下,所有检测器都会运行。
* [分类模式](https://github.com/crytic/slither/wiki/Usage#triage-mode) 用于过滤单个结果

## 输出器

### 快速概览输出器

* `human-summary`: [输出合约的人类可读摘要](https://github.com/trailofbits/slither/wiki/Printer-documentation#human-summary)
* `inheritance-graph`: [将每个合约的继承图导出为 dot 文件](https://github.com/trailofbits/slither/wiki/Printer-documentation#inheritance-graph)
* `contract-summary`: [输出合约的摘要](https://github.com/trailofbits/slither/wiki/Printer-documentation#contract-summary)
* `loc`: [统计源代码文件 (SRC)、依赖文件 (DEP) 和测试文件 (TEST) 中的总代码行数 (LOC)、源代码行数 (SLOC) 和注释行数 (CLOC)。](https://github.com/trailofbits/slither/wiki/Printer-documentation#loc)
* `entry-points`: [输出合约中所有改变状态的入口点函数及其变量](https://github.com/trailofbits/slither/wiki/Printer-documentation#entry-points)

### 深入审查输出器* `call-graph`: [将合约的调用图导出为 dot 文件](https://github.com/crytic/slither/wiki/Printer-documentation#call-graph)
* `cfg`: [导出每个函数的 CFG](https://github.com/crytic/slither/wiki/Printer-documentation#cfg)
* `function-summary`: [打印函数摘要](https://github.com/crytic/slither/wiki/Printer-documentation#function-summary)
* `vars-and-auth`: [打印写入的状态变量和函数的授权信息](https://github.com/crytic/slither/wiki/Printer-documentation#variables-written-and-authorization)
* `not-pausable`: [打印未使用 `whenNotPaused` 修饰符的函数](https://github.com/crytic/slither/wiki/Printer-documentation#when-not-paused).

要运行打印机,请使用 `--print` 和逗号分隔的打印机列表。

参见 [打印机文档](https://github.com/crytic/slither/wiki/Printer-documentation) 获取完整列表。

## 工具

* `slither-check-upgradeability`: [审查基于 `delegatecall` 的可升级性](https://github.com/crytic/slither/blob/master/docs/src/tools/Upgradeability-Checks.md)
* `slither-prop`: [自动生成单元测试和属性](https://github.com/crytic/slither/blob/master/docs/src/tools/Property-generation.md)
* `slither-flat`: [扁平化代码库](https://github.com/crytic/slither/blob/master/docs/src/tools/Contract-Flattening.md)
* `slither-check-erc`: [检查 ERC 合规性](https://github.com/crytic/slither/blob/master/docs/src/tools/ERC-Conformance.md)
* `slither-read-storage`: [从合约读取存储值](https://github.com/crytic/slither/blob/master/docs/src/tools/ReadStorage.md)
* `slither-interface`: [为合约生成接口](https://github.com/crytic/slither/blob/master/docs/src/tools/Interface.md)

参见 [工具文档](https://github.com/crytic/slither/blob/master/docs/src/tools/README.md) 获取更多工具。

[联系我们](https://www.trailofbits.com/contact/) 以获取构建自定义工具的帮助。

## API 文档

Slither 内部文档可在 [此处](https://crytic.github.io/slither/slither.html) 获取。

## 获取帮助

欢迎访问我们的 [Slack 频道](https://empireslacking.herokuapp.com) (#ethereum) 以获取使用或扩展 Slither 的帮助。

* [打印机文档](https://github.com/crytic/slither/wiki/Printer-documentation) 描述了 Slither 能够为每个合约可视化的信息。

* [检测器文档](https://github.com/crytic/slither/wiki/Adding-a-new-detector) 描述了如何编写新的漏洞分析。

* [API 文档](https://github.com/crytic/slither/wiki/Python-API) 描述了可用于自定义分析的方法和对象。

* [SlithIR 文档](https://github.com/crytic/slither/wiki/SlithIR) 描述了 SlithIR 中间表示。

## 常见问题解答

如何排除模拟或测试?

* 查看关于[路径过滤](https://github.com/crytic/slither/wiki/Usage#path-filtering) 的文档。

如何解决“未知文件”或编译问题?

* 由于 slither 需要 solc AST,它必须具备所有依赖关系。
如果一个合约有依赖关系,`slither contract.sol` 会失败。
相反,在 `contracts/` 的父目录中使用 `slither .`(当你运行 `ls` 时应该能看到 `contracts/`)。
如果你有 `node_modules/` 文件夹,它必须与 `contracts/` 位于同一目录。为了验证此问题是否与 slither 相关,
运行你正在使用的框架的编译命令,例如 `npx hardhat compile`。该命令必须成功执行;
否则,slither 的编译引擎 crytic-compile 无法生成 AST。

## 许可证

Slither 根据 AGPLv3 许可证授权和分发。如果你正在寻找许可证条款的例外情况,请[联系我们](mailto:[email protected])。

## 出版文章

### Trail of Bits 出版文章

* [Slither: 智能合约的静态分析框架](https://arxiv.org/abs/1908.09878), Josselin Feist, Gustavo Grieco, Alex Groce - WETSEB '19

### 外部出版文章

标题 | 用途 | 作者 | 会议/期刊 | 代码
--- | --- | --- | --- | ---
[ReJection: A AST-Based Reentrancy Vulnerability Detection Method](https://www.researchgate.net/publication/339354823_ReJection_A_AST-Based_Reentrancy_Vulnerability_Detection_Method) | 基于AST的分析,构建于Slither之上 | Rui Ma, Zefeng Jian, Guangyuan Chen, Ke Ma, Yujia Chen | CTCIS 19 | -
[MPro: Combining Static and Symbolic Analysis for Scalable Testing of Smart Contract](https://arxiv.org/pdf/1911.00570.pdf) | 通过Slither利用数据依赖关系 | William Zhang, Sebastian Banescu, Leodardo Pasos, Steven Stewart, Vijay Ganesh | ISSRE 2019 | [MPro](https://github.com/QuanZhang-William/M-Pro)
[ETHPLOIT: From Fuzzing to Efficient Exploit Generation against Smart Contracts](https://wcventure.github.io/FuzzingPaper/Paper/SANER20_ETHPLOIT.pdf) | 通过Slither利用数据依赖关系 | Qingzhao Zhang, Yizhuo Wang, Juanru Li, Siqi Ma | SANER 20 | -
[Verification of Ethereum Smart Contracts: A Model Checking Approach](http://www.ijmlc.org/vol10/977-AM0059.pdf) | 基于Slither的CFG构建符号执行 | Tam Bang, Hoang H Nguyen, Dung Nguyen, Toan Trieu, Tho Quan | IJMLC 20 | -
[Smart Contract Repair](https://arxiv.org/pdf/1912.05823.pdf) | 依赖Slither的漏洞检测器 | Xiao Liang Yu, Omar Al-Bataineh, David Lo, Abhik Roychoudhury | TOSEM 20 | [SCRepair](https://github.com/xiaoly8/SCRepair/)
[Demystifying Loops in Smart Contracts](https://www.microsoft.com/en-us/research/uploads/prod/2020/08/loops_solidity__camera_ready-5f3fec3f15c69.pdf) | 通过Slither利用数据依赖关系 | Ben Mariano, Yanju Chen, Yu Feng, Shuvendu Lahiri, Isil Dillig | ASE 20 | -
[Trace-Based Dynamic Gas Estimation of Loops in Smart Contracts](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9268144) | 使用Slither的CFG检测循环 | Chunmiao Li, Shijie Nie, Yang Cao, Yijun Yu, Zhenjiang Hu | IEEE Open J. Comput. Soc. 1 (2020) | -
[SAILFISH: Vetting Smart Contract State-Inconsistency Bugs in Seconds](https://arxiv.org/pdf/2104.08638.pdf) | 依赖SlithIR构建*存储依赖图* | Priyanka Bose, Dipanjan Das, Yanju Chen, Yu Feng, Christopher Kruegel, and Giovanni Vigna | S&P 22 | [Sailfish](https://github.com/ucsb-seclab/sailfish)
[SolType: Refinement Types for Arithmetic Overflow in Solidity](https://arxiv.org/abs/2110.00677) | 使用Slither作为前端构建细化类型系统 | Bryan Tan, Benjamin Mariano, Shuvendu K. Lahiri, Isil Dillig, Yu Feng | POPL 22 | -
[Do Not Rug on Me: Leveraging Machine Learning Techniques for Automated Scam Detection](https://www.mdpi.com/2227-7390/10/6/949) | 使用Slither提取代币特征(可铸造、可暂停等) | Mazorra, Bruno, Victor Adan, and Vanesa Daza | Mathematics 10.6 (2022) | -
[MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilities](https://arxiv.org/abs/2208.13252) | 使用Slither提取CFG和调用图 | Hoang Nguyen, Nhat-Minh Nguyen, Chunyao Xie, Zahra Ahmadi, Daniel Kudendo, Thanh-Nam Doan and Lingxiao Jiang | IEEE 9th International Conference on Data Science and Advanced Analytics (DSAA, 2022) | [ge-sc](https://github.com/MANDO-Project/ge-sc)
[Automated Auditing of Price Gouging TOD Vulnerabilities in Smart Contracts](https://www.cs.toronto.edu/~fanl/papers/price-icbc22.pdf) | 使用Slither提取CFG和数据依赖关系 | Sidi Mohamed Beillahi, Eric Keilty, Keerthi Nelaturu, Andreas Veneris, and Fan Long | 2022 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) | [Smart-Contract-Repair](https://github.com/Veneris-Group/TOD-Location-Rectification)
[Modeling and Enforcing Access Control Policies for Smart Contracts](https://publikationen.bibliothek.kit.edu/1000152805/151859658) | 扩展Slither的数据依赖关系 | Jan-Philipp Toberg, Jonas Schiffl, Frederik Reiche, Bernhard Beckert, Robert Heinrich, Ralf Reussner | IEEE International Conference on Decentralized Applications and Infrastructures (DAPPS), 2022 | [SolidityAccessControlEnforcement](https://github.com/KASTEL-CSSDA/SolidityAccessControlEnforcement)
[Smart Contract Vulnerability Detection Based on Deep Learning and Multimodal Decision Fusion](https://www.mdpi.com/1424-8220/23/16/7246) | 使用Slither提取CFG | Weichu Deng, Huanchun Wei, Teng Huang, Cong Cao, Yun Peng, and Xuan Hu | Sensors 2023, 23, 7246 | -
[Semantic-enriched Code Knowledge Graph to Reveal Unknowns in Smart Contract Code Reuse](https://www.researchgate.net/profile/Qing-Huang-26/publication/370638129_Semantic-enriched_Code_Knowledge_Graph_to_Reveal_Unknowns_in_Smart_Contract_Code_Reuse/links/645b7b8639c408339b3a54da/Semantic-Enriched-Code-Knowledge-Graph-to-Reveal-Unknowns-in-Smart-Contract-Code-Reuse.pdf) | 使用Slither提取代码特征(CFG、函数、参数类型等) | Qing Huang, Dianshu Liao, Zhenchang Xing, Zhengkang Zuo, Changjing Wang, Xin Xia | ACM Transactions on Software Engineering and Methodology, 2023 | -
[Smart Contract Parallel Execution with Fine-Grained State Accesses](https://personal.ntu.edu.sg/yi_li/files/Qi2023SCP.pdf) | 使用Slither构建状态访问图 | Xiaodong Qi, Jiao Jiao, Yi Li | International Conference on Distributed Computing Systems (ICDCS), 2023 | -
```

---

[Read more](https://github.com/crytic/slither)
下载工具