Comments (7)
Yes, it seems you are doing everything right - so it it hard to say, what is wrong. Lets try two things:
- Can you try it with some binary that does not use custom IDA loader? This should not cause the described problem, but who knows. Just try it with as simple binary as possible.
- If it still does not work (probable), can you try running RetDec from
cmd.exe
the same way the plugin does (it usessh
)?
sh retdec-decompiler.sh --help
sh retdec-decompiler.sh simple-binary.exe
from retdec-idaplugin.
- Using a simple binary (
32-bit Windows DLL
) inIDA
also fails with the same problem (but I don't get the custom loader warning) - From
cmd.exe
it works but I just usedretdec-decompiler.sh simple-binary.dll
instead of the prependedsh
since thesh
command is not installed and it doesn't seem to be needed though.
With win-bash
:
>C:\shell\sh.exe retdec-decompiler.sh simple-binary.dll
C:\Users\User\AppData\Local\Temp\191776.201428.inc.sh2: readlink: command not found
retdec-decompiler.sh: ./retdec-utils.sh: No such file or directory
retdec-decompiler.sh: syntax error near unexpected token `<<<'
retdec-decompiler.sh: retdec-decompiler.sh: line 184: ` IFS='-' read -a vs <<< "$r" # parser line into array'
I might be doing the later wrong but since I'm running Windows
, readlink
doesn't exist (it's a Linux
command). Also I'm not sure why the IDA
plugin uses sh
when it works from cmd.exe
without it.
from retdec-idaplugin.
I am facing the exactly same issue as outlined in the 1st post.
(Windows 10/64, most recent IDA Pro, retdec and plugin, following all instructions from the Github pages)
C:\Users\Michael>sh retdec-decompiler.sh test.exe /c/retdec/bin/retdec-decompiler.sh: line 23: ./retdec-utils.sh: No such file or directory
C:\Users\Michael>bash retdec-decompiler.sh test.exe /c/retdec/bin/retdec-decompiler.sh: line 23: ./retdec-utils.sh: No such file or directory /c/retdec/bin/retdec-decompiler.sh: line 169: get_realpath: command not found /c/retdec/bin/retdec-decompiler.sh: line 170: get_realpath: command not found
from retdec-idaplugin.
Fixed here : c195e41 pull request here : #27
from retdec-idaplugin.
I think the problem is the missing sh
(i.e. missing MSYS2). Right now, it is a bit tricky to set up everything correctly. Section 2.2 of plugin's user guide says you need a properly installed standalone RetDec. The instructions to follow say to install and configure MSYS2 on Windows. Then, you should have both sh
and readlink
(and a bunch of other stuff).
Standalone RetDec might be working on your system even without MSYS2, but it does not on all Windows systems. That is why the plugin is explicitly calling sh
(MSYS2) at the moment. If the MSYS2 is installed and in the path, it should work for all.
Try to install MSYS2.
There is already a pull request that rewrites all bash scripts to Python. Once this is finalized and merged, the whole process should be much simpler - no MSYS, only Python. We will definitely create a new release, maybe even an all in one that contains both RetDec and plugin and will not need to be configured much (at all?).
from retdec-idaplugin.
Thanks for your reply.
Not sure if I understand correctly, but when I use 'MSYS2' a MSYS-shell opens.
C:\msys64\mingw64\bin;C:\msys64;C:\msys64\usr\bin; are included in my path.
from retdec-idaplugin.
After installing MYS2
and adding C:\msys64\usr\bin;C:\msys64;C:\msys64\usr\bin
to the PATH
it works now for me now. I also agree that Python
would be better.
from retdec-idaplugin.
Related Issues (20)
- Loading of output C file FAILED on Mac HOT 2
- Can help compile a mac version, A Mac IDA7.0 is here HOT 4
- retdec 4.0 unrecognized arguments HOT 5
- lauch_process ... failed with error code 2 HOT 6
- launch_process(...) failed with error code 1 HOT 3
- retdec not loading HOT 2
- How to compile the c file generated by retdec-idaplugin? HOT 1
- Default invocation broken for 32bit targets HOT 4
- Compilation failed during configure-msvc step for yara HOT 1
- Build with old SDK
- Continued support for IDA 7.2-7.4 HOT 2
- Please support IDA 7.7 HOT 8
- The compiled version from release doees not work HOT 4
- Unable to parse decompilation output: The document is empty. HOT 6
- Build failures on macOS HOT 3
- IDA7.7 v1.0 release does not work HOT 6
- Decompile Pesudo Code No Longer Works HOT 1
- this dll let plugin crash
- GLIBC_2.34 error with IDAPro v8.3
- I don't see parameters being used within the code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retdec-idaplugin.