|
|
@ -1,18 +1,18 @@ |
|
|
|
from mythril.analysis.report import Report |
|
|
|
from mythril.analysis.report import Report |
|
|
|
from .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas |
|
|
|
from mythril.analysis import modules |
|
|
|
|
|
|
|
import pkgutil |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def fire_lasers(statespace): |
|
|
|
def fire_lasers(statespace): |
|
|
|
|
|
|
|
|
|
|
|
issues = [] |
|
|
|
issues = [] |
|
|
|
|
|
|
|
_modules = [] |
|
|
|
|
|
|
|
|
|
|
|
issues += delegatecall_forward.execute(statespace) |
|
|
|
for loader, name, is_pkg in pkgutil.walk_packages(modules.__path__): |
|
|
|
issues += delegatecall_to_dynamic.execute(statespace) |
|
|
|
_modules.append(loader.find_module(name).load_module(name)) |
|
|
|
issues += call_to_dynamic_with_gas.execute(statespace) |
|
|
|
|
|
|
|
issues += unchecked_suicide.execute(statespace) |
|
|
|
for module in _modules: |
|
|
|
issues += unchecked_retval.execute(statespace) |
|
|
|
issues += module.execute(statespace) |
|
|
|
issues += ether_send.execute(statespace) |
|
|
|
|
|
|
|
issues += integer_underflow.execute(statespace) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (len(issues)): |
|
|
|
if (len(issues)): |
|
|
|
report = Report(issues) |
|
|
|
report = Report(issues) |
|
|
|