diff --git a/README.md b/README.md index 5d057cfb..8618cb5a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Discord](https://img.shields.io/discord/481002907366588416.svg)](https://discord.gg/E3YrVtG) [![PyPI](https://badge.fury.io/py/mythril.svg)](https://pypi.python.org/pypi/mythril) [![Read the Docs](https://readthedocs.org/projects/mythril/badge/?version=master)](https://mythril.readthedocs.io/en/master/) -![Master Build Status](https://img.shields.io/circleci/project/github/ConsenSys/mythril/master.svg) +![Master Build Status](https://img.shields.io/circleci/build/github/ConsenSys/mythril.svg?token=97124ecfaee54366859cae98b5dafc0714325f8b) [![Sonarcloud - Maintainability](https://sonarcloud.io/api/project_badges/measure?project=mythril&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=mythril) [![Pypi Installs](https://pepy.tech/badge/mythril)](https://pepy.tech/project/mythril) [![DockerHub Pulls](https://img.shields.io/docker/pulls/mythril/myth.svg?label=DockerHub Pulls)](https://cloud.docker.com/u/mythril/repository/docker/mythril/myth) diff --git a/mythril/analysis/symbolic.py b/mythril/analysis/symbolic.py index cdcb9070..e84939bf 100644 --- a/mythril/analysis/symbolic.py +++ b/mythril/analysis/symbolic.py @@ -42,6 +42,7 @@ class SymExecWrapper: modules=(), compulsory_statespace=True, enable_iprof=False, + run_analysis_modules=True, ): """ @@ -90,14 +91,15 @@ class SymExecWrapper: plugin_loader.load(PluginFactory.build_mutation_pruner_plugin()) plugin_loader.load(PluginFactory.build_instruction_coverage_plugin()) - self.laser.register_hooks( - hook_type="pre", - hook_dict=get_detection_module_hooks(modules, hook_type="pre"), - ) - self.laser.register_hooks( - hook_type="post", - hook_dict=get_detection_module_hooks(modules, hook_type="post"), - ) + if run_analysis_modules: + self.laser.register_hooks( + hook_type="pre", + hook_dict=get_detection_module_hooks(modules, hook_type="pre"), + ) + self.laser.register_hooks( + hook_type="post", + hook_dict=get_detection_module_hooks(modules, hook_type="post"), + ) if isinstance(contract, SolidityContract): self.laser.sym_exec( diff --git a/mythril/mythril/mythril_analyzer.py b/mythril/mythril/mythril_analyzer.py index 5d0596e2..d4d4cd5b 100644 --- a/mythril/mythril/mythril_analyzer.py +++ b/mythril/mythril/mythril_analyzer.py @@ -75,6 +75,7 @@ class MythrilAnalyzer: execution_timeout=self.execution_timeout, create_timeout=self.create_timeout, enable_iprof=self.enable_iprof, + run_analysis_modules=False, ) return get_serializable_statespace(sym) @@ -108,6 +109,7 @@ class MythrilAnalyzer: transaction_count=transaction_count, create_timeout=self.create_timeout, enable_iprof=self.enable_iprof, + run_analysis_modules=False, ) return generate_graph(sym, physics=enable_physics, phrackify=phrackify)