jsdec icon indicating copy to clipboard operation
jsdec copied to clipboard

Using `jsdec` with Cutter always fails to parse JSON output of it:

Open XVilka opened this issue 2 years ago • 6 comments

Describe the bug Before opening a bug report run rzpm install jsdec and verify it crashes also on the latest version. A clear and concise description of what the bug is (if known).

Component

  • [ ] core
  • [x] arm
  • [ ] avr
  • [ ] m68k
  • [ ] mips
  • [ ] ppc
  • [ ] sparc
  • [ ] v850
  • [ ] wasm
  • [x] x86-64

Reproduce via JSON (pddi)

<pddi or pdd --issue JSON>

jsdec_30_pddi.txt.zip

Failed to parse JSON
TypeError: cannot read property 'type' of undefined
at [anon] (duk_hobject_props.c:2549) internal
at [anon] (libdec/annotation.js:140)
at [anon] (libdec/printer.js:141) preventsyield
at forEach () native strict preventsyield
at [anon] (libdec/printer.js:144)
at jsdec_main (jsdec-duk.js:112)
at eval (eval:1) preventsyield

Failed to parse JSON
TypeError: cannot read property 'type' of undefined
at [anon] (duk_hobject_props.c:2549) internal
at [anon] (libdec/annotation.js:140)
at [anon] (libdec/printer.js:141) preventsyield
at forEach () native strict preventsyield
at [anon] (libdec/printer.js:144)
at jsdec_main (jsdec-duk.js:112)
at eval (eval:1) preventsyield

XVilka avatar Feb 19 '23 11:02 XVilka

I have a similar issue with several of the win32 binaries in the IOLI crackmes. pddi output: https://pastebin.com/cqP6Y5uv

The IOLI crackmes are built against MinGW. I found that I can decompile the linux binaries without issue.

chucklesb avatar Nov 22 '23 02:11 chucklesb

is this dev or main ?

wargio avatar Nov 22 '23 10:11 wargio

I have a similar issue with several of the win32 binaries in the IOLI crackmes. pddi output: https://pastebin.com/cqP6Y5uv

The IOLI crackmes are built against MinGW. I found that I can decompile the linux binaries without issue.

can you share the bin? i can't repro

wargio avatar Nov 22 '23 10:11 wargio

https://github.com/rizinorg/book/raw/master/src/crackmes/ioli/IOLI-crackme.tar.gz

Cutter 2.3.2 running on Windows 11 Pro. Open bin-win32/crackme0x00.exe in Cutter with analysis (aaa) enabled. Open the main function in the decompiler view.

Note, Cutter 2.0.5 seems to work as expected.

chucklesb avatar Nov 22 '23 21:11 chucklesb

@wargio: Were you able to reproduce the issue given that information?

chucklesb avatar Nov 30 '23 19:11 chucklesb

yes, i was able to reproduce it, seems that something changed on rizin side and is returning an empty value. i'm not sure if it is worth spending time understanding what is wrong or just merging dev into master.

wargio avatar Dec 01 '23 11:12 wargio