> For the complete documentation index, see [llms.txt](https://pwc-3.gitbook.io/pwc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pwc-3.gitbook.io/pwc/ji-shu/untitled/code-audit/zhi-neng-he-yue-dai-ma-shen-ji.md).

# 智能合约代码审计

## mythril安装与使用 <a href="#mythril" id="mythril"></a>

[github地址](https://github.com/ConsenSys/mythril)

### 安装solitity <a href="#solitity" id="solitity"></a>

[github地址](https://github.com/ethereum/solidity)

[官方安装文档](https://solidity.readthedocs.io/en/v0.4.21/installing-solidity.html)

* **Ubuntu安装**

```
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
```

### 安装mythril <a href="#mythril_1" id="mythril_1"></a>

```
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install -y solc
sudo apt-get install libssl-dev
sudo apt-get install -y python3-pip=9.0.1-2 python3-dev
sudo ln -s /usr/bin/python3 /usr/local/bin/python
sudo apt-get install -y pandoc
sudo apt-get install -y git
pip3 install mythril
```

### 使用mythril <a href="#mythril_2" id="mythril_2"></a>

```
myth -x *.sol:contract -o markdown
```
