Skip to content

Commit

Permalink
More flexible regex for replacing library placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerberndt committed May 8, 2018
1 parent e7c1d49 commit 5a69a52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mythril/ether/ethcontract.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def __init__(self, code, creation_code="", name="Unknown"):
# Workaround: We currently do not support compile-time linking.
# Dynamic contract addresses of the format __[contract-name]_____________ are replaced with a generic address

code = re.sub(r'(_+[A-Za-z0-9]+_+)', 'aa' * 20, code)
code = re.sub(r'(_+.*_+)', 'aa' * 20, code)

print(code)

self.code = code
self.disassembly = Disassembly(self.code)
Expand Down

0 comments on commit 5a69a52

Please sign in to comment.