mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
444 B
16 lines
444 B
import sys
|
|
from slither.slither import Slither
|
|
|
|
|
|
if len(sys.argv) != 2:
|
|
print("python function_called.py contract.sol")
|
|
sys.exit(-1)
|
|
|
|
# Init slither
|
|
slither = Slither(sys.argv[1])
|
|
|
|
for contract in slither.contracts:
|
|
for function in contract.functions + contract.modifiers:
|
|
filename = f"{sys.argv[1]}-{contract.name}-{function.full_name}.dot"
|
|
print(f"Export {filename}")
|
|
function.slithir_cfg_to_dot(filename)
|
|
|