From b5add50230b2b073af8c5fcd2bd1e525085bf4cc Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Tue, 3 Oct 2017 16:30:57 +0700 Subject: [PATCH] Allow underscore in function names --- mythril/ether/ethcontract.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mythril/ether/ethcontract.py b/mythril/ether/ethcontract.py index 968a5fbb..0ea18bd5 100644 --- a/mythril/ether/ethcontract.py +++ b/mythril/ether/ethcontract.py @@ -44,7 +44,7 @@ class ETHContract(persistent.Persistent): easm_code = self.get_easm() str_eval = '' - matches = re.findall(r'func#([a-zA-Z0-9\s,(\\)\[\]]+)#', expression) + matches = re.findall(r'func#([a-zA-Z0-9\s_,(\\)\[\]]+)#', expression) for m in matches: # Calculate function signature hashes @@ -53,7 +53,6 @@ class ETHContract(persistent.Persistent): expression = expression.replace(m, sign_hash) - tokens = re.split("( and | or )", expression, re.IGNORECASE) for token in tokens: