NullAILab/nullai-smart-contract-auditor

GitHub: NullAILab/nullai-smart-contract-auditor

纯Python编写的EVM字节码反汇编器和智能合约漏洞扫描器,可检测重入、整数溢出等常见安全风险。

Stars: 0 | Forks: 0

# 智能合约审计器 ![Python](https://img.shields.io/badge/python-3.11-blue?logo=python) ![Tests](https://img.shields.io/badge/tests-24%20passed-brightgreen) ![License](https://img.shields.io/badge/license-MIT-green) 纯 Python 编写的 EVM 字节码反汇编器和智能合约漏洞扫描器 — 可检测重入、整数溢出、未检查调用、delegatecall、selfdestruct 和时间戳依赖。 ## 检测到的漏洞 | ID | 名称 | 严重程度 | |----|------|---------| | SWC-107 | 重入 | 严重 | | SWC-101 | 整数溢出/下溢 | 高 | | SWC-104 | 未检查的调用返回值 | 中 | | SWC-112 | 对不可信被调用者的 Delegatecall | 高 | | SWC-106 | 未受保护的 Selfdestruct | 严重 | | SWC-116 | 时间戳依赖 | 中 | ## 用法 ``` from src import SmartContractAuditor auditor = SmartContractAuditor() report = auditor.audit(bytecode) # bytes # 或者 report = auditor.audit_hex("6001600201f155") # hex string print(report.summary()) # 审计: 6 条指令, 2 个发现 (CRITICAL=1, HIGH=1), 风险=60 for finding in report.findings: print(finding) ``` ## 运行测试 ``` python -m pytest tests/ -q ``` ## 许可证 MIT
标签:DeFi安全, delegatecall, EVM, Python, selfdestruct, Solidity, SWC, Web3安全, 以太坊虚拟机, 区块链安全, 去中心化金融, 字节码反汇编, 整数溢出, 无后门, 时间戳依赖, 智能合约审计, 智能合约漏洞检测, 未检查返回值, 重入漏洞