Update setup.py

pull/12/head
Bernhard Mueller 7 years ago
parent e824333583
commit f739be8ca5
  1. 1
      laser
  2. 35
      lol.py
  3. 3
      setup.py

@ -0,0 +1 @@
../laser-ethereum/laser/

@ -0,0 +1,35 @@
import os
from mythril.ether.contractstorage import get_persistent_storage
from mythril.rpc.client import EthJsonRpc
from mythril.disassembler.disassembly import Disassembly
from laser.ethereum import laserfree
import logging
app_root = os.path.dirname(os.path.realpath(__file__))
db_dir = os.path.join(app_root, "database")
eth = EthJsonRpc("localhost", 8545)
contract_storage = get_persistent_storage(os.path.join(os.path.expanduser('~'), ".mythril"))
logging.basicConfig(level=logging.INFO)
def searchCallback(contract_hash, contract, addresses, balances):
try:
print("Checking contract: " + str(contract_hash))
print(addresses[0])
disas = Disassembly(contract.code)
laserfree.fire(disas)
except Exception as e:
print(str(e))
print("Searching " +str(len(list(contract_storage.contracts))) + " contracts...")
contract_storage.search("code#PUSH#", searchCallback)

@ -254,7 +254,8 @@ setup(
install_requires=[ install_requires=[
'ethereum>=2.0.4', 'ethereum>=2.0.4',
'ZODB>=5.3.0', 'ZODB>=5.3.0',
'graphviz>=0.8' 'graphviz>=0.8',
'web3'
], ],
python_requires='>=3.5', python_requires='>=3.5',

Loading…
Cancel
Save