2021TCTF - Gas Machine
题目信息
1 | [+] You need to implement a smart contract as the gas machine, and send us its RUNTIME bytecode. |
解题思路
- 用循环消耗
gas到某一边界值 - 字节码最后面填充
jumpdest - 根据剩余的
gas选择jump到后面的jumpdest
调试思路
使用如下脚本部署字节码
1 | pragma solidity ^0.5.10; |

部署成功后将直接发送交易给合约


最后即可成功


解题脚本
1 | #!/usr/bin/env python |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
