Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check suicide problem #21

Open
bkmsx opened this issue May 18, 2018 · 1 comment
Open

Check suicide problem #21

bkmsx opened this issue May 18, 2018 · 1 comment

Comments

@bkmsx
Copy link

bkmsx commented May 18, 2018

Can you tell me what went wrongly?

$ python maian.py -s Coursetro.sol Coursetro -c 0

====================================================================================================
[ ] Compiling Solidity contract from the file Coursetro.sol ...  Done 
[-] Some blockchain is active, killing it... Cannot kill
[ ] Connecting to PRIVATE blockchain emptychain   ESTABLISHED 
[ ] Deploying contract .... confirmed at address: 0xD47ACC6943D09359F7D77cE51f562bf14950391B 
[ ] Contract code length on the blockchain :    1018  : b'`\x80`@R`\x046\x10a\x00LW`\x005|\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'... 
[ ] Contract address saved in file: ./out/Coursetro.address 
[ ] Check if contract is SUICIDAL

[ ] Contract address   : 0xD47ACC6943D09359F7D77cE51f562bf14950391B
[ ] Contract bytecode  : b'`\x80`@R`\x046\x10a\x00LW`\x005|\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x04c\xff'...
[ ] Bytecode length    : 1018
[ ] Blockchain contract: True
[ ] Debug              : False
Traceback (most recent call last):
  File "maian.py", line 182, in <module>
    main(sys.argv[1:])
  File "maian.py", line 142, in main
    if 0 == MyGlobals.checktype: ret = check_suicide.check_one_contract_on_suicide(code, contract_address, MyGlobals.debug, MyGlobals.read_from_blockchain, True, fhashes)
  File "/Users/bkmsx/Documents/Solidity/Tools/MAIAN/tool/check_suicide.py", line 53, in check_one_contract_on_suicide
    ops = parse_code( contract_bytecode, debug )
  File "/Users/bkmsx/Documents/Solidity/Tools/MAIAN/tool/parse_code.py", line 26, in parse_code
    if op >= '60' and op <='7f':
TypeError: '>=' not supported between instances of 'bytes' and 'str'
@gsalzer
Copy link

gsalzer commented Dec 20, 2021

You are probably using Python3, whereas Maian was originally written for Python2. Try the fork at https://github.com/smartbugs/MAIAN, which updates Maian to work with recent versions of Python3, web3 and z3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants