From ed7902cb5cbd26ad68a1f877cbff06097117b032 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Mon, 18 Sep 2017 15:05:39 +0700 Subject: [PATCH] Parsing of RPC options --- mythril.py | 2 +- util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mythril.py b/mythril.py index e07fa70f..ec702bb9 100755 --- a/mythril.py +++ b/mythril.py @@ -36,7 +36,7 @@ if (args.disassemble): elif (args.transaction_hash): try: - encoded_bytecode = util.bytecode_from_blockchain(args.transaction_hash) + encoded_bytecode = util.bytecode_from_blockchain(args.transaction_hash, args.rpchost[0], args.rpcport[0]) except Exception as e: exitWithError("Exception loading bytecode via RPC: " + str(e.message)) diff --git a/util.py b/util.py index 66bb319e..8d1fc679 100644 --- a/util.py +++ b/util.py @@ -13,7 +13,7 @@ def bytecode_from_blockchain(creation_tx_hash, rpc_host='127.0.0.1', rpc_port=85 creation_tx_hash = ID of transaction that created the contract. """ - eth = EthJsonRpcWithDebug('127.0.0.1', 8545) + eth = EthJsonRpcWithDebug(rpc_host, rpc_port) trace = eth.traceTransaction(creation_tx_hash)