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

No output on decompiling with porosity #30

Open
sid226 opened this issue Sep 11, 2017 · 1 comment
Open

No output on decompiling with porosity #30

sid226 opened this issue Sep 11, 2017 · 1 comment

Comments

@sid226
Copy link

sid226 commented Sep 11, 2017

Hi,
was analyzing Slockit Byte-code for vulnerabilities using porosity. I am not getting any output.

Bytecode:
https://live.ether.camp/account/598b7457cdabab2f3d361b77e12cd42dc8617cdd

ABI:
https://live.ether.camp/account/598b7457cdabab2f3d361b77e12cd42dc8617cdd/contract

Steps:
create output/DynamicToken.abi
https://gist.github.com/sid226/2119c9745dc0336dc3c8f4a05b59c7e7

create output/DynamicToken.bin
https://gist.github.com/sid226/975149153c354486b3884fa7cc8521bb

OS: Ubuntu 16.04.2 LTS

Commands:
abi=$(< output/DynamicToken.abi)
bin=$(< output/DynamicToken.bin)

porosity --code $bin --abi $abi --list --verbose 0
porosity --abi $abi --code $bin –disassm
porosity --abi $abi --code $bin --decompile --verbose 0

Output:
Porosity v0.1 (https://www.comae.io)
Matt Suiche, Comae Technologies [email protected]
The Ethereum bytecode commandline decompiler.
Decompiles the given Ethereum input bytecode and outputs the Solidity code.

@sid226
Copy link
Author

sid226 commented Sep 11, 2017

I guess its the problem with solc version i'm using.

Version: 0.4.16+commit.d7661dd9.Linux.g++

The ABI on ether.camp site differs from the abi generated by the local solc using the same solidity code.
New ABI: https://gist.github.com/sid226/d550ecbfe6fe20a2e8417bd31bf3ebb8

command
solc --abi -o output DynamicToken.sol

some differences present in new ABI:
"payable":false
"stateMutability":"nonpayable"
"type":"fallback"
"stateMutability":"view"

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

1 participant