Change default db dir and add option to change it

pull/2/head
Bernhard Mueller 7 years ago
parent 3605fd0f34
commit a25932c9e3
  1. 0
      mythril/__init__.py
  2. 0
      mythril/ether/__init__.py
  3. 0
      mythril/ether/asm.py
  4. 4
      mythril/ether/contractstorage.py
  5. 0
      mythril/ether/ethcontract.py
  6. 0
      mythril/ether/evm.py
  7. 2
      mythril/ether/util.py
  8. 15
      mythril/mythril
  9. 0
      mythril/rpc/__init__.py
  10. 0
      mythril/rpc/client.py
  11. 0
      mythril/rpc/constants.py
  12. 0
      mythril/rpc/exceptions.py
  13. 0
      mythril/rpc/utils.py
  14. 4
      setup.py

@ -1,5 +1,5 @@
from rpc.client import EthJsonRpc
from ether.ethcontract import ETHContract, InstanceList
from mythril.rpc.client import EthJsonRpc
from mythril.ether.ethcontract import ETHContract, InstanceList
import hashlib
import os
import persistent

@ -1,4 +1,4 @@
from rpc.client import EthJsonRpc
from mythril.rpc.client import EthJsonRpc
import codecs
from ethereum.abi import encode_abi, encode_int
from ethereum.utils import zpad

@ -4,15 +4,15 @@
http://www.github.com/b-mueller/mythril
"""
from ether import asm,evm,util
from ether.contractstorage import get_persistent_storage
from mythril.ether import asm,evm,util
from mythril.ether.contractstorage import get_persistent_storage
from mythril.rpc.client import EthJsonRpc
from ethereum import utils
import sys
import argparse
from rpc.client import EthJsonRpc
import os
DEFAULT_DB_DIR = "~/.mythril"
def searchCallback(code_hash, code, addresses, balances):
print("Matched contract with code hash " + code_hash )
@ -41,9 +41,10 @@ parser.add_argument('--sync-all', action='store_true', help='Also sync contracts
parser.add_argument('--rpchost', default='127.0.0.1', help='RPC host')
parser.add_argument('--rpcport', type=int, default=8545, help='RPC port')
app_root = os.path.dirname(os.path.realpath(__file__))
db_dir = os.path.join(app_root, "database")
try:
db_dir = os.environ['DB_DIR']
except KeyError:
db_dir = DEFAULT_DB_DIR
contract_storage = get_persistent_storage(db_dir)

@ -9,7 +9,7 @@ long_description = '''
setup(
name='mythril',
version='0.2.3',
version='0.2.4',
description='A bug hunting tool framework for the Ethereum blockchain',
long_description=long_description,
@ -51,5 +51,5 @@ setup(
extras_require={
},
scripts=['mythril']
scripts=['mythril/mythril']
)

Loading…
Cancel
Save