Hello all, I’m deepakchethan from India. I got to work on the console interface improvements for radare2 as a part of 2019’s edition of Radare Summer of Code. My main task was to improve the terminal interface of radare2. As a part of which I was tasked with completing 6 main tasks. I was unable to complete the table API myself, gladly pancake helped me with implementing the Table engine, while I worked on the integration and various improvements of it. I learned a lot in the 3 months and am very grateful to my mentors Pancake and XVilka for being flexible and supportive in all aspects of the program.
Radare2 already had vim-like autocompletion in the visual offset prompt. My job was to generalize it and integrate it with the RCons. This feature can be enabled by setting scr.prompt.popup. It is still a little buggy but the result is as follows:
[Ox1000011e8]> e scr.prompt.popup = true [Ox1000011e8]> e scr.prompt. --. * <TAB> * | scr.prompt.file | | scr.prompt.flag | | scr.prompt.mode | | scr.prompt.popup | | scr.prompt.sect | | scr.prompt.vi | `------------------'
Autocompletion was not supported for k and other mount based commands. I was tasked to add them. I also integrated dietline into mount shell (ms) and HUD mode.
0> fun 51 - 0x100001055 69 sym.func.100001055 0x1000010 8 50 sym.func.10000108 0x10000111a 59 sym.func.10000111a 0x100001155 69 sym.func.100001155 0x100001e5f 2567 sym.func.1000015f 0x100002950 285 sym.func.100002950 0x100003358 320 sym.func.100003358 0x10000357c 3702 sym.func.10000357c 0x1000035b2 128 sym.func.1000035b2 0x100003a50 381 sym.func.100003a50 0x100003c5d 13 sym.func.100003c5d
I added the missing emacs hotkeys and added vi modes, which can be enabled by setting scr.prompt.vi to true. As a bonus if you set scr.prompt.mode to true, the color of the prompt changes based on the vi mode (control/insert). See the exact list of the hotkeys in Dietline Radare2 book chapter.
I also added support for some bash commands like uniq, sort, join, etc.,
My next task was to add support for ASCII/Unicode graphs for radiff2. But I noticed that the agd-based diff commands were not implemented in radare2. So I began with that, once it was complete, exporting them to radiff2 was relatively simple. Now, radiff2 supports all these graph outputs:
All the reflines in disasm were of the same kind, which was a bit confusing. So I added different colors for up and down going reflines. The new look:
refline
I also added UTF8 support for line graph commands like p= and p==.
p==
like it is done for graphs
I was not able to implement the table API, but pancake did it. So I was tasked to add UTF-8 support and integrate the table API in the various commands that will benefit from the table representation. The p-h command integrated with the table API looks as follows:
[Ox1000012a3]> p-h offset flags funcs amts syms str 0x100000000 2 0x100000ee0 17 0x100001a08 1 0x100001dcO 2 0x100002530 1 0x1000028e8 2 0x100003058 2 0x100003410 5 0x1000037c8 1 0x100003680 6 0x100003f38 2 0x1000042f0 79 0x1000046a8 6 0x100004a60 53 0x100004e18 86 0x1000051d0 28 0x100005588 0x100005cf8
I fixed quite a bunch of bugs and all of these can be found here.