Use the `-d` flag to disassemble code. The disassembler accepts a bytecode string or a contract address as its input.
Use the `-d` flag to disassemble code. The disassembler accepts a bytecode string or a contract address as its input.
```
```bash
$ myth -d -c "$ ./myth -d -c "5060"
$ myth -d -c "$ ./myth -d -c "5060"
0 PUSH1 0x60
0 PUSH1 0x60
```
```
Specifying an address via `-a ADDRESS` will download the contract code from your node. Mythril will try to resolve function names using the signatures in `database/signature.json`:
Specifying an address via `-a ADDRESS` will download the contract code from your node. Mythril will try to resolve function names using the signatures in `database/signature.json`:
```
```bash
$ myth -d -a "0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208"
$ myth -d -a "0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208"
0 PUSH1 0x60
0 PUSH1 0x60
2 PUSH1 0x40
2 PUSH1 0x40
@ -79,7 +79,7 @@ $ myth -d -a "0x2a0c0dbecc7e4d658f48e01e3fa353f44050c208"
Adding the `-g FILENAME` option will output a call graph:
Adding the `-g FILENAME` option will output a call graph:
```
```bash
$ myth -d -a "0xFa52274DD61E1643d2205169732f29114BC240b3" -g ./graph.svg
$ myth -d -a "0xFa52274DD61E1643d2205169732f29114BC240b3" -g ./graph.svg
```
```
@ -91,6 +91,7 @@ Note that currently, Mythril only processes `JUMP` and `JUMPI` instructions with
You can run a code trace in the PyEthereum virtual machine. Optionally, input data can be passed via the `--data` flag.
You can run a code trace in the PyEthereum virtual machine. Optionally, input data can be passed via the `--data` flag.
```bash
$ myth -t -a "0x3665f2bf19ee5e207645f3e635bf0f4961d661c0"
$ myth -t -a "0x3665f2bf19ee5e207645f3e635bf0f4961d661c0"
It is often useful to find other contracts referenced by a particular contract. Let's assume you want to search for contracts that fulfill conditions similar to the [Parity Multisig Wallet Bug](http://hackingdistributed.com/2017/07/22/deep-dive-parity-bug/). First, you want to find a list of contracts that use the `DELEGATECALL` opcode:
It is often useful to find other contracts referenced by a particular contract. Let's assume you want to search for contracts that fulfill conditions similar to the [Parity Multisig Wallet Bug](http://hackingdistributed.com/2017/07/22/deep-dive-parity-bug/). First, you want to find a list of contracts that use the `DELEGATECALL` opcode:
```
```bash
$ myth --search "code#DELEGATECALL#"
$ myth --search "code#DELEGATECALL#"
Matched contract with code hash 07459966443977122e639cbf7804c446
Matched contract with code hash 07459966443977122e639cbf7804c446