1

I understand how to normally install the plugins with

$ r2pm init
$ r2pm update
$ r2pm -i r2snow
$ r2pm -i r2dec

But how would I install r2dec when I am on a system that has radare2 installed already but no internet access? Is there a way to copy over the source and edit a configuration file somewhere to inform r2 of its presence?

1 Answers1

1

Start from downloading r2dec from its Github repository (either by cloning it or using the GitHub interface). Then, you can copy r2dec-js folder to your target computer in any way you prefer. On the target computer simply cd to the "r2dec-js" repository and execute make -C p. This will install r2dec without any need of internet connection. Then, you can simply use r2dec by using the pdd command inside radare2.

On the computer with an internet connection:

# Clone the repository
$ git clone https://github.com/wargio/r2dec-js

# Copy the folder to the target machine

On the target computer, without internet connection:

$ cd r2dec-js
r2dec-js$ make -C p

In general, r2pm is a package manager that follows the installation steps which are in each package. These steps, for each package, are available in the r2pm repository.

Megabeets
  • 1,378
  • 11
  • 19
  • Thank you for the directions. It looks like I may have missed a step in my r2 installation, because when I try to make r2dec, it complains about missing packages r_util, r_io, r_cons, r_core and then fatally errors on building duktape due to r_cons.h missing. – Justin Henderson Oct 31 '18 at 16:53
  • And for background, I installed r2 by running ./configure --prefix=/usr --with-syscapstone before make; make install. – Justin Henderson Oct 31 '18 at 17:02
  • I corrected the compilation issue by specifying PKG_CONFIG_PATH to point to my radare/pkgcfg directory, which in this case was ~/radare2-3.0.1/pkgcfg Next r2 was not picking up my r2dec installation still, and after some monkeying around I think what I needed to do was move my r2dec-js download to ~/.local/share/radare2/r2pm/git/r2dec-js – Justin Henderson Oct 31 '18 at 18:46