diff --git a/mythril/mythril b/mythril/mythril index 83fbc84d..1e16892e 100755 --- a/mythril/mythril +++ b/mythril/mythril @@ -77,7 +77,10 @@ if (args.disassemble): else: exitWithError("Disassembler: Provide the input bytecode via -c BYTECODE or --id ID") - disassembly = asm.disassemble(util.safe_decode(encoded_bytecode)) + try: + disassembly = asm.disassemble(util.safe_decode(encoded_bytecode)) + except binascii.Error: + exitWithError("Disassembler: Invalid code string.") easm_text = asm.disassembly_to_easm(disassembly)