diff --git a/myth b/myth index 37145a50..904449a8 100755 --- a/myth +++ b/myth @@ -14,7 +14,6 @@ from mythril.rpc.client import EthJsonRpc from mythril.ipc.client import EthIpc from ethereum import utils from laser.ethereum import laserfree -import yaml import logging import binascii import sys @@ -131,7 +130,7 @@ if (args.code): elif (args.address): encoded_bytecode = eth.eth_getCode(args.address) elif (args.infile): - encoded_bytecode = compile_solidity(args.infile) + encoded_bytecode = compile_solidity(solc_binary, args.infile) else: exitWithError("No input bytecode. Please provide EVM code via -c BYTECODE, -a ADDRESS, or -i SOLIDITY_FILE") diff --git a/mythril/ether/util.py b/mythril/ether/util.py index 3ba70848..83d4016f 100644 --- a/mythril/ether/util.py +++ b/mythril/ether/util.py @@ -12,8 +12,8 @@ def safe_decode(hex_encoded_string): return bytes.fromhex(hex_encoded_string) -def compile_solidity(file): - output = subprocess.check_output(["solc", "--bin-runtime", file]) +def compile_solidity(solc_binary, file): + output = subprocess.check_output(["solc", "--bin-runtime", file], stderr=subprocess.DEVNULL) m = re.search(r"runtime part: \\n(.*)\\n", str(output)) return m.group(1)