|
|
@ -49,7 +49,7 @@ class MythrilAnalyzer: |
|
|
|
def dump_statespace( |
|
|
|
def dump_statespace( |
|
|
|
self, |
|
|
|
self, |
|
|
|
strategy: str, |
|
|
|
strategy: str, |
|
|
|
contract: List[EVMContract], |
|
|
|
contract: List[EVMContract] = None, |
|
|
|
address: Optional[str] = None, |
|
|
|
address: Optional[str] = None, |
|
|
|
max_depth: Optional[int] = None, |
|
|
|
max_depth: Optional[int] = None, |
|
|
|
execution_timeout: Optional[int] = None, |
|
|
|
execution_timeout: Optional[int] = None, |
|
|
@ -68,7 +68,7 @@ class MythrilAnalyzer: |
|
|
|
:return: The serialized state space |
|
|
|
:return: The serialized state space |
|
|
|
""" |
|
|
|
""" |
|
|
|
sym = SymExecWrapper( |
|
|
|
sym = SymExecWrapper( |
|
|
|
contract, |
|
|
|
contract or self.contracts[0], |
|
|
|
address, |
|
|
|
address, |
|
|
|
strategy, |
|
|
|
strategy, |
|
|
|
dynloader=DynLoader( |
|
|
|
dynloader=DynLoader( |
|
|
@ -87,13 +87,14 @@ class MythrilAnalyzer: |
|
|
|
def graph_html( |
|
|
|
def graph_html( |
|
|
|
self, |
|
|
|
self, |
|
|
|
strategy: str, |
|
|
|
strategy: str, |
|
|
|
contract: List[EVMContract], |
|
|
|
|
|
|
|
address: str, |
|
|
|
address: str, |
|
|
|
|
|
|
|
contract: List[EVMContract] = None, |
|
|
|
max_depth: Optional[int] = None, |
|
|
|
max_depth: Optional[int] = None, |
|
|
|
enable_physics: bool = False, |
|
|
|
enable_physics: bool = False, |
|
|
|
phrackify: bool = False, |
|
|
|
phrackify: bool = False, |
|
|
|
execution_timeout: Optional[int] = None, |
|
|
|
execution_timeout: Optional[int] = None, |
|
|
|
create_timeout: Optional[int] = None, |
|
|
|
create_timeout: Optional[int] = None, |
|
|
|
|
|
|
|
transaction_count: Optional[int] = None, |
|
|
|
enable_iprof: bool = False, |
|
|
|
enable_iprof: bool = False, |
|
|
|
) -> str: |
|
|
|
) -> str: |
|
|
|
""" |
|
|
|
""" |
|
|
@ -106,11 +107,12 @@ class MythrilAnalyzer: |
|
|
|
:param phrackify: If true generates Phrack-style call graph |
|
|
|
:param phrackify: If true generates Phrack-style call graph |
|
|
|
:param execution_timeout: The total execution timeout of the contract |
|
|
|
:param execution_timeout: The total execution timeout of the contract |
|
|
|
:param create_timeout: The total contract creation timeout |
|
|
|
:param create_timeout: The total contract creation timeout |
|
|
|
|
|
|
|
:param transaction_count: The amount of transactions to be executed |
|
|
|
:param enable_iprof: Enables/disables instruction profiler |
|
|
|
:param enable_iprof: Enables/disables instruction profiler |
|
|
|
:return: The generated graph in html format |
|
|
|
:return: The generated graph in html format |
|
|
|
""" |
|
|
|
""" |
|
|
|
sym = SymExecWrapper( |
|
|
|
sym = SymExecWrapper( |
|
|
|
contract, |
|
|
|
contract or self.contracts[0], |
|
|
|
address, |
|
|
|
address, |
|
|
|
strategy, |
|
|
|
strategy, |
|
|
|
dynloader=DynLoader( |
|
|
|
dynloader=DynLoader( |
|
|
@ -120,6 +122,7 @@ class MythrilAnalyzer: |
|
|
|
), |
|
|
|
), |
|
|
|
max_depth=max_depth, |
|
|
|
max_depth=max_depth, |
|
|
|
execution_timeout=execution_timeout, |
|
|
|
execution_timeout=execution_timeout, |
|
|
|
|
|
|
|
transaction_count=transaction_count, |
|
|
|
create_timeout=create_timeout, |
|
|
|
create_timeout=create_timeout, |
|
|
|
enable_iprof=enable_iprof, |
|
|
|
enable_iprof=enable_iprof, |
|
|
|
) |
|
|
|
) |
|
|
|