diff --git a/mythril/ethereum/evmcontract.py b/mythril/ethereum/evmcontract.py index de0b7ae7..b0914a8f 100644 --- a/mythril/ethereum/evmcontract.py +++ b/mythril/ethereum/evmcontract.py @@ -37,6 +37,10 @@ class EVMContract(persistent.Persistent): return self.disassembly.get_easm() + def get_creation_easm(self): + + return self.creation_disassembly.get_easm() + def matches_expression(self, expression): str_eval = "" diff --git a/mythril/interfaces/cli.py b/mythril/interfaces/cli.py index 8e4867de..27a4725a 100644 --- a/mythril/interfaces/cli.py +++ b/mythril/interfaces/cli.py @@ -364,10 +364,12 @@ def main(): print(storage) elif args.disassemble: - easm_text = mythril.contracts[ - 0 - ].get_easm() # or mythril.disassemble(mythril.contracts[0]) - sys.stdout.write(easm_text) + # or mythril.disassemble(mythril.contracts[0]) + + if mythril.contracts[0].code: + 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: if not mythril.contracts: