Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

README.TXT is out of date #132

Closed spacepirate0001 closed 6 years ago

spacepirate0001 commented 6 years ago

README.TXT is out of date:

Usage: python Krakatau\decompile.py [-nauto] [-path PATH] [-out OUT] [-r] [-skip] target

but it seems that the arguments are different. Can you please update this? Im getting unrecognized arguments error.

Storyyeller commented 6 years ago

What error are you getting?

spacepirate0001 commented 6 years ago

Unrecognized arguments error. I kept getting the error because the decompile.py args are different from what the package -h actually suggests. I got it to work eventually, but wanted to draw your attention to the Readme.txt instructions. Also, can you recommend a way to use decompile as API? I want to pass a list of targets to be decompiled one at a time, any suggestions?

Storyyeller commented 6 years ago

Could you explain which arguments you tried to pass that caused the error?

As for an API, only the command line interface is officially supported, but there's nothing stopping you from importing it as a Python module.

spacepirate0001 commented 6 years ago

in the Readme.txt file args are as follows: python Krakatau\decompile.py [-nauto] [-path PATH] [-out OUT] [-r] [-skip] target

But in -h: python decompile.py [-path PATH] [-out OUT] [-nauto] [-r] [-skip] [-xmagicthrow] target

I think something about the arrangement throw me off and caused " unrecognized arguments error". Also, the [-xmagicthrow] arg what is it for?

Storyyeller commented 6 years ago

So does that mean that everything is correct? If so, I'll go ahead and close the issue.

As for -xmagicthrow, it treats every non-jump instruction as being able to potentially throw, which effectively prevents Krakatau from optimizing away exception handlers based on which instructions it assumes can throw. It was added at samczsun's request, but it's not really meant for widespread usage, which is why it is undocumented.

spacepirate0001 commented 6 years ago

Yes Sir! Thank you so much for your dedication.

spacepirate0001 commented 6 years ago

Can I bug you with a question? I'm trying to log the outcome of the decompile process and I'm using subprocess to check the return. Q: how can I access the trace back to log the lib which was not found or the err in general?

Thanks Haytham

On Jan 15, 2018, at 12:27 AM, Robert Grosse notifications@github.com wrote:

Closed #132.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Storyyeller commented 6 years ago

There isn't any easy way to do that, since going through subprocess means that you just get text back, and you'd have to parse it yourself. The best approach would be to just import Krakatau and call the code directly.

spacepirate0001 commented 6 years ago

Ok thanks.

On Jan 16, 2018, at 5:29 PM, Robert Grosse notifications@github.com wrote:

There isn't any easy way to do that, since going through subprocess means that you just get text back, and you'd have to parse it yourself. The best approach would be to just import Krakatau and call the code directly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.