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

"Debug Error" errors #29

Open
wanshun123 opened this issue Sep 2, 2017 · 1 comment
Open

"Debug Error" errors #29

wanshun123 opened this issue Sep 2, 2017 · 1 comment

Comments

@wanshun123
Copy link

I've copied the vulnerable.sol file from the readme and am trying the following commands:

solcjs --abi -o output vulnerable.sol
solcjs --bin -o output vulnerable.sol
$abi = Get-Content .\output\vulnerable_sol_SendBalance.abi
$bin = Get-Content .\output\vulnerable_sol_SendBalance.bin

Upon then running commands like .\porosity --abi $abi --code $bin --decompile --verbose 0 or .\porosity --abi $abi --code $bin --disassm I get the following:

Debug Error!

Program: : C:...\porosity.exe

abort() has been called

(Press Retry to debug the application)

The program also generates a different abi/bin for me to what the readme gives, using the exact same vulnerable.sol contract. This is my vulnerable_sol_SendBalance.abi generated for me:

[{"constant":false,"inputs":[],"name":"withdrawBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"addToBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"u","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

And the .bin:

60606040526000600160006101000a81548160ff021916908315150217905550341561002a57600080fd5b5b61024f8061003a6000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635fd8c71014610054578063c0e317fb14610069578063f8b2cb4f1461007e575b600080fd5b341561005f57600080fd5b6100676100cb565b005b341561007457600080fd5b61007c61018b565b005b341561008957600080fd5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506101da565b6040518082815260200191505060405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff166111116000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051600060405180830381858888f19350505050151561014457600080fd5b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b565b346000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b9190505600a165627a7a72305820507e433b649b743e7ebd61621446c039ca839abe247a44049eb57bcc5226fe2d0029

Also this is to do with solc not porosity, but the command solcjs --bin-runtime -o output vulnerable.sol I can't run (I get a

Invalid option selected, must specify either --bin or --abi

error).

Any help appreciated.

@maoguai
Copy link

maoguai commented Nov 4, 2017

i have met the same problems. when i run "porosity --code $code --abi $abi --list --verbose 0", it doesn't work . do you solve it ?
command "solcjs --bin-runtime -o output vulnerable.sol" I can't run should be "solcjs --bin -runtime -o output vulnerable.sol".

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