Enable creation bytecode option (#787)

* Enable creation bytecode option

* Additional fix

* Update mythril/interfaces/cli.py

Co-Authored-By: cryptobarbossa <42328224+cryptobarbossa@users.noreply.github.com>

* Update mythril/interfaces/cli.py

Co-Authored-By: cryptobarbossa <42328224+cryptobarbossa@users.noreply.github.com>

* Solution cleanup

* Output additions
pull/807/head
cryptobarbossa 6 years ago committed by JoranHonig
parent e661eac348
commit a1fc2a4ee5
  1. 4
      mythril/ethereum/evmcontract.py
  2. 10
      mythril/interfaces/cli.py

@ -37,6 +37,10 @@ class EVMContract(persistent.Persistent):
return self.disassembly.get_easm() return self.disassembly.get_easm()
def get_creation_easm(self):
return self.creation_disassembly.get_easm()
def matches_expression(self, expression): def matches_expression(self, expression):
str_eval = "" str_eval = ""

@ -364,10 +364,12 @@ def main():
print(storage) print(storage)
elif args.disassemble: elif args.disassemble:
easm_text = mythril.contracts[ # or mythril.disassemble(mythril.contracts[0])
0
].get_easm() # or mythril.disassemble(mythril.contracts[0]) if mythril.contracts[0].code:
sys.stdout.write(easm_text) print("Runtime Disassembly: \n" + mythril.contracts[0].get_easm())
if mythril.contracts[0].creation_code:
print("Disassembly: \n" + mythril.contracts[0].get_creation_easm())
elif args.graph or args.fire_lasers: elif args.graph or args.fire_lasers:
if not mythril.contracts: if not mythril.contracts:

Loading…
Cancel
Save