533 Commits

Author SHA1 Message Date
condret
e54103eef9
Add tests for r_id_storage (#17548) 2020-09-01 00:49:41 +08:00
HoundThe
f01711583a
Fix compilation warnings ##dwarf (#17544) 2020-09-01 00:48:03 +08:00
meowmeowxw
3ffe3f88d2
Add commands to parse mangling pointers glibc heap ##heap (#17534)
* Add dmhtm for tcache mangling pointers

* Add dmhfm for fastbins with mang ptrs

* Add dmhfm <n> for fastbins

* Pointer mangling support to dmh

* Fix spacing for PROTECT_PTR

* Add fastbins checks for dmh

* Clean code for next_pointer

* Use ternary operator when possible

* Add dbg.glibc.demangle option

* Set correct initial_brk for multi-glibc support

* Remove comments and unneeded variables

* Remove 'm' commands, use demangle variable

* Update description of dbg.glibc.demangle

* Test for tcache 2.32 and remove old ones

* Force tests

* Solve insidious bug of filenames

* Fix dmh test and more tcache testing

* Remove unused variables
2020-09-01 00:45:12 +08:00
Riccardo Schirone
850bf37886
Fix #17494 - Pass the whole input string to r_core_cmd_str_pipe ##newshell (#17533)
* Ensure num->value is saved before anything else, otherwise it may change

r_config_get_i calls r_num_math, which sets the num->value, thus losing
the return value of the last command.

* Make r_core_cmd_str_pipe use the new parser when enabled
2020-08-28 13:13:23 +02:00
junchao-loongson
087e5652b3
Improve iA command for MIPS/ELF ##bin (#17516) 2020-08-28 11:11:34 +02:00
junchao-loongson
ac1f0d13b5
Fix #9821 - Add JALR JR shortcat support when the target address can be calculated ##anal (#17498) 2020-08-28 13:30:17 +08:00
Florian Märkl
a1ce176371
Fix oob read in getFunctionName() (#17527) 2020-08-27 11:08:47 +02:00
condret
1cae744fd5
Add tests for idpool (#17515) 2020-08-26 09:21:35 +02:00
HoundThe
605f48fb20
Add DWARF tests for Ada and Freepascal ##anal (#17504) 2020-08-25 12:05:38 +08:00
GustavoLCR
489538e02b
Add DbgEng based debug backend for Windows ##debug (#17491)
* Rename `windbg` plugin to `winkd` ##debug
* Add DbgEng based debug backend for Windows ##debug
2020-08-24 19:01:10 +08:00
Khairul Azhar Kasmiran
52668c02d2
r2r: Check whether test has EXPECT or EXPECT_ERR (#17508) 2020-08-24 18:29:37 +08:00
Zi Fan
3c88900134
Implement save and load functions for debug session ##debug (#17430)
* Add `dtst` and `dtsf` commands
* Change `RDebugSession` to store its data in their own sdb namespace
* Add `r_debug_session_serialize()` and `r_debug_session_deserialize()` API
* Add unit tests for `RDebugSession `save and load functions
2020-08-20 12:25:47 +08:00
HoundThe
5845ec39ca
Add function information from DWARF ##anal ##bin (#17434) 2020-08-19 18:21:20 +08:00
RHL120
e58b2f6f33
Reload file when opening a project ##projects (#17296) 2020-08-19 11:15:53 +08:00
Khairul Kasmiran
1176a810c3 Do r2 shortcut test 2020-08-19 11:14:52 +08:00
Anton Kochkov
2e24aa6b9f Fix #17458 - fix wrongly written tests 2020-08-19 11:13:50 +08:00
junchao-loongson
f0e2c3ee97
Handle DADDU instruction MIPS, used for GP calculation ##anal (#17484) 2020-08-18 20:16:36 +02:00
Khairul Azhar Kasmiran
fb1190d248
meson install: Create shortcut/symlink to radare2 (#17463) 2020-08-18 18:22:17 +08:00
junchao
c4a6d0e537 rename 2020-08-18 12:26:12 +08:00
karliss
adc2fb525d
Improve cons_html_filter. (#17471)
Better handle mix of background and text color changes.
2020-08-17 09:13:20 +03:00
Dennis Goodlett
99df8f8293
Add best match reverse search ##signatures (#17467)
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-08-17 12:37:27 +08:00
Florian Märkl
3ef9c81da9
Add the r_json json parser based on nxjson ##util (#17439) 2020-08-14 20:57:09 +02:00
GustavoLCR
bb3e80c040
Implement pde to disassemble following code execution ##disasm (#17410)
* Implement `pde` to disassemble following code execution
* Fix `asm.filter=1` with `scr.color=0`
* Fix cache not being used
* Share read and write file permissions on Windows
* Use CreateFileW in r_sandbox_open on Windows and fix file permissions
* Fix opening nul and O_RDWR
* File creation flags cannot be combined on Windows
* Share write in r_file_mmap_windows
2020-08-13 10:05:38 +08:00
junchao-loongson
4272c44c18
Fix MIPS loading instruction analysis bug ##anal (#17408) 2020-08-13 09:55:17 +08:00
Dennis Goodlett
ee133222fe
Add zignature spaces to ##rasign2 (#17404)
* Add zignature spaces to ##rasign2
* Update help information
* Use space API instead of core

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-08-11 12:36:10 +08:00
Sylvain Pelissier
2d53f7083b
Update crypto key search to find keys between blocks ##search (#17323) 2020-08-11 12:31:55 +08:00
NIRMAL MANOJ C
b4677b4dfe
Add Function Name, Constants, Globals and Local Variables to RAnnotatedCode (#17429)
* Annotation for function name (#17204)
* Annotations for Constant Variables and Global Variables for the decompiler (#17281)
* Annotation For Function Variables (#17375)
* function variable annotation added (includes local variable and function parameter)
* API for checking if an annotation is a reference or function variable. (#17386)
* Update docs in annotate code API  (#17397)
* Unit tests for annotated code API (#17403)
2020-08-10 13:40:16 +03:00
HoundThe
8571499c54
Don't depend on flags when parsing RTTI ##anal (#17365) 2020-08-09 17:55:21 +08:00
GustavoLCR
bf5618855c
Fix test (#17428) 2020-08-09 13:50:21 +08:00
GustavoLCR
f657f6d746
Fix test typo (#17427) 2020-08-09 13:10:11 +08:00
pancake
340c006db8
Fix #17322 - Honor bin.baddr from idp to load rebased PDB files ##bin (#17321)
Co-authored-by: pancake <pancake@nopcode.org>
2020-08-07 17:25:56 +08:00
HoundThe
b44b8cb405
Add acg - printing class hierarchy graph ##anal (#17362)
* add `acg` - printing class hierarchy graph
* Move the printing into the cmd_anal.c from returned RAGraph
* Change API to return Graph and transform it to AGraph when printing is necessary
* Move graph to agraph into agraph module, move generic node structure to rgraph, removing unnecessary dependency
* Move RGraphNodeInfo related functions to graph.c
2020-08-07 17:23:52 +08:00
HoundThe
dfa964e14c
Add base class information from RTTI into anal classes ##anal (#17405) 2020-08-07 09:31:43 +02:00
HoundThe
c06ac96f2e
Change Itanium VTable detection heuristic ##anal (#17359)
* Changed vtable detection heuristic that RTTI must be inside the same section as the Vtable
* Add test for PPC binary
2020-08-06 12:25:20 +08:00
Dennis Goodlett
1641f52140
Add bytes to zb command ##signatures (#17364)
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-08-05 16:07:50 +08:00
phakeobj
bab84c59e3
Introduce R_ANAL_OP_FAMILY_SECURITY ##anal (#17394)
* Merge PAC and MTE op families into SECURITY
* Add BTI to anal hacks
Co-authored-by: phakeobj <phakeobj@users.noreply.github.com>
2020-08-03 10:44:42 +02:00
GustavoLCR
148cd105de
Fix main detection for debug PE bins ##bin (#17376)
* Fix main detection for debug PE bins
* Add tests for PE main detection
2020-08-03 12:30:11 +08:00
Sylvain Pelissier
2ff979c7be
Update test for yara flags (#17392) 2020-08-03 12:28:43 +08:00
Riccardo Schirone
154416c8fd
Add unit tests for binheap (#17367) 2020-07-31 18:09:50 +08:00
phakeobj
4c207712bd
Add hack for ARMv8 BTI instruction disassembly ##anal (#17371)
Co-authored-by: phakeobj <phakeobj@users.noreply.github.com>
2020-07-31 18:08:59 +08:00
GustavoLCR
401162fb09
Fix case detection for another type of indirect jump table ##anal (#17377)
* Fix case detection for another type of indirect jump table
* Add test for indirect jump table
2020-07-31 18:07:52 +08:00
GustavoLCR
cef191cde3
Fix #14024 - Make r_io_map_get() faster (#17324) ##io
* Fix O(n) in r_io_map_get() ##io
* Kill `map_skyline_shadow` and `do_skyline`
2020-07-31 10:04:57 +02:00
Aswin C
1aca4f2135
Use PJ in kj ##json (#17258) 2020-07-31 12:22:32 +08:00
GustavoLCR
5b101b6521
Improve ARM and PPC analysis ##anal (#17356)
* Fix stepping with ESIL into thumb code
* Fix seek changed after `aaef`
* Run `aaef` instead of `aae` in `aaa`
* Fill IMM info for arm op
* Add op info for arm32 UXT opcodes
* Fill op src/dst info for cast ops on arm
* Fix false positives for reg args detection on arm/riscv
* Change `r_core_recover_vars()` to recurse on bbs
* Fix reg arena stack being corrupted on `aaef`
* Fix detection of var address references on `aaef`
* Fix arm pseudo syntax output
* Correctly substitute pc relative offsets
* Substitute address references to variables
* Fill op->cond for arm64
* Fix wrong jump table size for arm
* Fill bb->cond
* Implement r_anal_block_recurse_depth_first
* Use r_anal_block_recurse_depth_first on r_core_recover_vars
* Handle MRS/MSR on arm64
* Log if arm op not handled
* Complete arm op_fillval
* Convert 32bit arm64 reg names to 64bit
* Fix stackop analysis on PPC
* Fix tests
2020-07-29 10:41:26 +08:00
Riccardo Schirone
31573479e0
Directly pass multi-lines command to newshell (#17348) ##newshell
Fixes #16684
2020-07-28 18:11:14 +02:00
Azox
8ef62109a3
Improve ESIL support for ARM (clz, ldrb, sbc, tbh, tbb, it, blx, asr, lsl, cmp) ##anal (#17347) 2020-07-27 10:19:58 +02:00
Zi Fan
2dfa75cc47
Update record & replay features to trace reg/mem changes ##debug (#17127)
* Update record & replay features to trace reg/mem changes ##debug
* Support tracing in r_debug_continue_kill ##debug
* Fix error writing registers when stepping back and refactor ##debug
* Implement checkpoints for reverse debugging and make tests green ##debug
* Add `dbg.trace_continue` option to enable/disable tracing every instruction when continue
* Fix continue when tracing to allow skipping and continuing ##debug
2020-07-27 12:54:33 +08:00
Riccardo Schirone
48c30dfd99
Support compilation with meson on old systems like CentOS6/DebianWheezy ##build (#17345)
* Compile tree-sitter and newshell parser with gnu99 if possible ##meson
* Make sure to use `-lrt` when needed to use clock_gettime ##meson
2020-07-27 12:25:06 +08:00
HoundThe
eac93216ec
Improving PDB type information parsing and saving types into SDB (#17226) 2020-07-25 01:40:55 +08:00
pancake
b25c3275de
Add ovf tests and more overflow macro definitions ##util (#17216) 2020-07-24 13:21:52 +02:00