From ff16aa78f54514d0c869509fe66e29d9e31f5392 Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Wed, 6 Jun 2018 17:00:33 +0200 Subject: [PATCH] Change regex to the following: function + minimum 1 whitespace + minimum 1 word letter + ( + * characters that are not ) + ) --- mythril/support/signatures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythril/support/signatures.py b/mythril/support/signatures.py index 11a1e3f6..0431dd21 100644 --- a/mythril/support/signatures.py +++ b/mythril/support/signatures.py @@ -10,7 +10,7 @@ def add_signatures_from_file(file, sigs={}): code = f.read() - funcs = re.findall(r'function[\s]+(.*?\))', code, re.DOTALL) + funcs = re.findall(r'function[\s]+(\w+\([^\)]*\))', code, re.DOTALL) for f in funcs: