Fix processing of search patterns

pull/407/head
Bernhard Mueller 6 years ago
parent 82200d8df6
commit 26f839aa3c
  1. 10
      mythril/ether/ethcontract.py

@ -38,7 +38,11 @@ class ETHContract(persistent.Persistent):
str_eval = ''
easm_code = None
tokens = filter(None, re.split("(and|or|not)", expression.replace(" ", ""), re.IGNORECASE))
# tokens = filter(None, re.split("( and | or | not )", expression.replace(" ", ""), re.IGNORECASE))
tokens = re.split("\s+(and|or|not)\s+", expression, re.IGNORECASE)
print(tokens)
for token in tokens:
@ -65,5 +69,7 @@ class ETHContract(persistent.Persistent):
str_eval += "\"" + sign_hash + "\" in self.disassembly.func_hashes"
continue
print(str_eval)
return eval(str_eval.strip())

Loading…
Cancel
Save