Skip to content

Commit

Permalink
Update R2 to 5.8.8 and various release fixes (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio authored Jun 9, 2023
1 parent 7ee4ade commit 02f4a5d
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 23 deletions.
54 changes: 43 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ on:
branches:
- master

# Automatically cancel any previous workflow on new push.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

env:
R2V: 5.7.8
R2V: 5.8.8

jobs:
linux:
Expand All @@ -28,19 +33,46 @@ jobs:
sudo dpkg -i *.deb
- name: make build
run: CFLAGS=-DR2DEC_HOME="\\\"$(r2 -H R2_LIBR_PLUGINS)\\\"" make -j -C p
- name: test
run: make -C p install && r2 -Qc 'af;pdd' /bin/ls
- name: test with javascript files
run: |
sudo make -C p install
r2 -Qc 'Lc' malloc://10
OUTPUT=$(r2 -Qc 'af;pdd' /bin/ls)
CHECK=$(echo -e "$OUTPUT" | grep "r2dec pseudo code output")
echo -e "$OUTPUT"
if [ -z "$CHECK" ]; then
exit 1
fi
sudo make -C p uninstall
- name: make jsc build
run: make -C p clean && CFLAGS=-DR2DEC_HOME="\\\"$(r2 -H R2_LIBR_PLUGINS)\\\"" make -j -C p USE_JSC=1
- name: test
run: make -C p install && r2 -Qc 'af;pdd' /bin/ls
- name: test with jsc
run: |
sudo make -C p install
r2 -Qc 'Lc' malloc://10
OUTPUT=$(r2 -Qc 'af;pdd' /bin/ls)
CHECK=$(echo -e "$OUTPUT" | grep "r2dec pseudo code output")
echo -e "$OUTPUT"
if [ -z "$CHECK" ]; then
exit 1
fi
sudo make -C p uninstall
- name: meson build
run: cd p ; meson -Djsc_folder=".." b && ninja -C b
- name: packaging
run: make -C p/dist/debian
- name: test
run: make -C p install && r2 -Qc 'af;pdd' /bin/ls
- uses: actions/upload-artifact@v2
- name: test deb
run: |
sudo dpkg -i p/dist/debian/*.deb
dpkg-query -L r2dec
r2 -Qc 'Lc' malloc://10
OUTPUT=$(r2 -Qc 'af;pdd' /bin/ls)
CHECK=$(echo -e "$OUTPUT" | grep "r2dec pseudo code output")
echo -e "$OUTPUT"
if [ -z "$CHECK" ]; then
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: r2dec-${{env.R2V}}_amd64.deb
path: p/dist/debian/*.deb
Expand All @@ -62,7 +94,7 @@ jobs:
sudo installer -pkg *.pkg -target /
- name: packaging
run: make -C p/dist/macos
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: r2dec-${{env.R2V}}-amd64.pkg
path: p/dist/macos/r2dec*.pkg
Expand Down Expand Up @@ -111,7 +143,7 @@ jobs:
copy b\*.dll "%PLUGINDIR%"
cd %BINDIR%
radare2.exe -Qc "pdd? ; aa ; pdd" radare2.exe
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: r2dec-${{env.R2V}}-w64.zip
path: r2dec-plugin
Expand Down Expand Up @@ -160,7 +192,7 @@ jobs:
copy b\*.dll "%PLUGINDIR%"
cd %BINDIR%
radare2.exe -Qc "pdd? ; aa ; pdd" radare2.exe
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: r2dec-${{env.R2V}}-w32.zip
path: r2dec-plugin
5 changes: 5 additions & 0 deletions .github/workflows/continuous-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: continuous-tests
on: [push]

# Automatically cancel any previous workflow on new push.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
eslint:
name: eslint
Expand Down
17 changes: 9 additions & 8 deletions p/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ endif
$(V)$(CC) $(CFLAGS) $(CFLAGS_PKG) -c $< -o $@

$(DESTDIR)$(R2DEC_HOME) $(DESTDIR)$(R2DEC_HOME)/libdec $(DESTDIR)$(PLUGDIR):
$(V)$(ECHO) "[MKDIR] $@"
$(V)$(MKDIR) $@

install-plugin: $(DESTDIR)$(R2DEC_HOME)/libdec $(DESTDIR)$(PLUGDIR) $(BIN)
$(V)$(CP) $(BIN) $(DESTDIR)$(PLUGDIR)
$(V)$(CP) -v $(BIN) $(DESTDIR)$(PLUGDIR)

symstall symlink: $(DESTDIR)$(PLUGDIR) $(DESTDIR)/$(R2DEC_HOME)/libdec
$(V)$(LN) $(shell pwd)/$(BIN) $(DESTDIR)$(PLUGDIR)
Expand All @@ -82,22 +83,22 @@ ifeq ($(USE_JSC),0)
endif

ifeq ($(USE_JSC),1)
install-libdec: $(DESTDIR)$(R2DEC_HOME)
$(V)$(CP) -r ../r2dec-duk.js ../require.js ../libdec "$(DESTDIR)$(R2DEC_HOME)"
install-libdec:
$(V)$(ECHO) "ignoring installing js files."

user-install-libdec:
$(V)$(MAKE) install-libdec PLUGDIR=$(shell r2 -H R2_USER_PLUGINS) R2DEC_HOME=$(shell r2 -H R2_USER_PLUGINS)/r2dec-js
$(V)$(ECHO) "ignoring installing js files."
else
install-libdec:
$(V)$(CP) -r ../r2dec-duk.js ../require.js ../libdec "$(DESTDIR)$(R2DEC_HOME)"
$(V)$(CP) -rv ../r2dec-duk.js ../require.js ../libdec "$(DESTDIR)$(R2DEC_HOME)"

user-install-libdec:
$(V)$(CP) -r ../r2dec-duk.js ../require.js ../libdec "$(shell r2 -H R2_USER_PLUGINS)"/r2dec-js
$(V)$(CP) -rv ../r2dec-duk.js ../require.js ../libdec "$(shell r2 -H R2_USER_PLUGINS)"/r2dec-js
endif

uninstall:
$(V)$(RM) $(DESTDIR)$(PLUGDIR)/$(BIN)
$(V)$(RM) -r $(DESTDIR)$(PLUGDIR)/r2dec-js
$(V)$(RM) -v $(DESTDIR)$(PLUGDIR)/$(BIN)
$(V)$(RM) -rv $(DESTDIR)$(R2DEC_HOME)

user-uninstall:
$(V)$(MAKE) uninstall PLUGDIR=$(shell r2 -H R2_USER_PLUGINS)
Expand Down
4 changes: 2 additions & 2 deletions p/dist/cydia/DESCR
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Frida plugin for radare2
This plugin will allow r2 on iOS to use the frida:// URI handler in the IO plugin in order to communicate with a local or remote Frida server and get the benefits of R2 and Frida together!
r2dec plugin for radare2
This plugin enables r2 to converts assembly to pseudo-C code.
4 changes: 2 additions & 2 deletions p/dist/debian/DESCR
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Frida plugin for radare2
This plugin enables r2 to talk with frida-server in local or remote devices running on Windows, Linux, Mac, iOS or Android via the frida:// URI handler.
r2dec plugin for radare2
This plugin enables r2 to converts assembly to pseudo-C code.

0 comments on commit 02f4a5d

Please sign in to comment.