Commit Graph

167 Commits

Author SHA1 Message Date
pancake
b7373f2b79 Add JSON output for r2 -V ##shell 2022-05-20 11:24:03 +02:00
pancake
1572f266e3 Add R2_COLOR env var for r2 when setting up scr.color ##shell 2022-05-06 08:02:37 +02:00
pancake
5b7c970f2b eprintf requires newline
* git grep eprintf | grep -v '\\n'| grep '('
2022-05-05 13:11:52 +02:00
pancake
7fe3556dd7 P+ is now an alias for Ps for consistency with P- ##projects 2022-05-04 09:56:38 +02:00
pancake
cdd4748192 Move asm.s390* into anal.s390* and fix aod when not using asm plugins ##refactor 2022-05-01 22:18:43 +02:00
pancake
cef87fbc7c RLog cleanup, dont use log is a libc function 2022-04-19 11:14:57 +02:00
pancake
e7816e4d67 Improve RLog API and usage, document R2_LOG_ vars in r2 -hh ##core 2022-04-19 11:14:57 +02:00
pancake
2faf3c2e39 Run r2pm from core internally ##shell 2022-04-13 10:17:35 +02:00
Dennis Goodlett
9d51dc07cd
Fix autoloading of ##signatures 2022-04-01 23:18:33 +02:00
Lazula
c7dfa70ade Remove last vestiges of newshell 2022-03-29 08:07:18 +02:00
pancake
69815e22e4
Fix #19838 - Show pins in the disassembly as comments ##disasm 2022-03-20 10:49:53 +01:00
Sergi Àlvarez i Capilla
8a68ef26d4 Fix last memleaks spotted by coverity scan 2022-03-18 16:39:06 +01:00
pancake
9779982241 Find strings on maddr'd binaries with izz ##bin
* Test with and without the -m
2022-02-27 19:56:31 +01:00
Sergi Àlvarez i Capilla
88e8fdfbd3 Fix assert when dbg.exe.path is "" 2022-02-12 12:19:55 +01:00
RHL120
785e500a7e
A better way to check if a project has been saved ##projects
* Add a dirty var to RFlag, RAnal and RConfig
* Add  prj.alwaysprompt
* Add R_DIRTY() and R_IS_DIRTY()
2022-01-25 10:39:15 +01:00
Lazula
c6bef817ae Fix leaks when pfile is overwritten in r_main_radare2() 2022-01-15 01:11:21 +01:00
Lazula
2255bf8b5d Many indentation style fixes
* Change several 8-space indents to tabs
* Apply tab indent style when breaking long lines
* Move operators from EOL to start of next line
* Fix ternary formatting
2021-11-18 10:43:52 +01:00
condret
44e3ff56ce Remove r_io_map_new from public API ##io 2021-11-03 17:55:39 +01:00
Sergi Àlvarez i Capilla
d50657eaed Be gentle and dont try to pick the current rbinobj if none was loaded 2021-10-16 14:37:53 +02:00
pancake
c6c9f4fbce
Fix some null checks around the open_many apis ##bin 2021-10-16 14:36:08 +02:00
Dennis Goodlett
d0055f5284
Prevent merging zigns on load ##signatures
* Prevent merging ##signatures of same name on load
* Rasign2 respect -m on -S
* Optimizations
2021-10-11 22:49:21 +02:00
pancake
dfd8be6bef
Fix format string vuln in crash handler (#19136) 2021-09-25 14:02:06 +02:00
pancake
d07ca80e68 Missing replacement 2021-09-25 12:44:25 +02:00
pancake
86472a6b4f
Fail with r2 -p unexistent-project ##projects
Co-authored-by: pancake <pancake@nopcode.org>
2021-09-19 00:16:46 +02:00
pancake
69cb36e8cf Dont save projects when no project is used ##projects 2021-08-15 10:59:15 +02:00
pancake
09033f4406
Honor faster ^D on interactive execution path ##cons (#18983) 2021-08-14 21:06:52 +02:00
pancake
857b1bfce1
Add scr.hist.filter to toggle the filtered history up/down search ##shell (#18913)
* Introduced in f6f7728cf4
2021-07-18 19:15:54 +02:00
pancake
c5b00d5457 Faster ^D (leave r2 without freeing the core) ##shell 2021-06-30 12:29:14 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build 2021-06-20 17:14:43 +02:00
gogo
a4dbf2eecd remove asm.bits 64 message 2021-06-12 04:04:55 +02:00
gogo
1ae185202d remove baddr message 2021-06-12 04:04:55 +02:00
gogo
9034239b59 remove message bin.baddr 2021-06-12 04:04:55 +02:00
RHL120
3b65b54a51
Fix #18641 prevent overwriting projects with Ps ##projects (#18755) 2021-05-26 23:42:38 +02:00
pancake
4ae7cef832 Add dxe? help, improve parsing and few egg boolification 2021-05-04 12:51:09 +02:00
pancake
d09709a061 Avoid this to happen on arm64 just in case 2021-04-26 11:08:40 +02:00
pancake
766d10e582 Only try thumb on arm targets 2021-04-26 11:07:31 +02:00
pancake
a7c08c15ce Don't scream out WARNINGs, capitalizing it is enough 2021-03-19 11:02:54 +01:00
pancake
e80a66aeb7 Add json version output to r2 -vj ##json 2021-03-17 11:47:05 +01:00
condret
827a8ac783 Enable io-plugins to set bin.baddr on launch ##io 2021-03-15 21:08:33 +01:00
pancake
3694865726
r2 -b acts like -e asm.bits, which resulted in anal plug issue (#18438) 2021-03-11 20:07:16 +01:00
pancake
cacc508fba
Fix #18412 - Add R2_IGNVER variable to load plugins ignoring the version ##core (#18413) 2021-03-03 18:03:58 +01:00
pancake
545f9197f1
Fix the archos regression in the CI (#18327) 2021-02-03 12:07:14 +01:00
ChD1
580bdf2c52
Fix some bugs in dex.c, marshal.c, panels.c and other code optimization and fixel (#18297) 2021-01-27 10:53:50 +01:00
Liumeo
14fee1797b
Fix memleak in test_r2pipe & test_esil_dfg_filter (#18271) 2021-01-24 00:17:02 +01:00
pancake
829862006f Initial deprecation of RCoreFile ##refactor 2021-01-08 02:09:57 +01:00
Liumeo
a74ca8f07b
Remove core.file ##refactor (#18178) 2021-01-06 23:44:18 +01:00
pancake
d7a4aedf5a Fix projects by removing code and honoring prj.name ##projects 2021-01-03 10:54:00 +01:00
pancake
8d4709bc0b Reworked P command with RProject and prj.name integration ##projects 2021-01-03 10:54:00 +01:00
pancake
898173aa38 Add RFile.new and RFile.move APIs ##util 2021-01-03 10:54:00 +01:00
pancake
cf91324937 Remove file.path and file.lastpath and add RProject ##projects 2021-01-03 10:54:00 +01:00
Qijia Liu
9e63a44c5c Fix memleak in r2 and test_big 2021-01-03 10:10:32 +01:00
pancake
89f6c6e1f1
Fix many ASAN issues, from uaf to memory leaks and some boolification (#18048) 2020-12-20 23:37:45 +01:00
pancake
2be5ff8762
Use r_core_cmd_str_pipe when using . in a panels (#17982) ##visual 2020-12-16 14:25:36 +01:00
pancake
b2f210a0cc
Fix asserts in r2 -a snes foo.sfc ##bin (#17990)
Co-authored-by: pancake <pancake@nopcode.org>
2020-12-04 12:16:09 +08:00
pancake
62c2128b6f
Better use of the R_SOCKET_PROTO_DEFAULT and add _NONE (#17644)
* Better use of the R_SOCKET_PROTO_DEFAULT and add _NONE ##http

* Fix regressions in: r2 -C and =+ ##r2pipe

Introduced in 04edfa82c1

* Implement sleep command ##shell

* Add tests for the webserver and remoting

* Implement daemon directive in rarun2, fix http test ##rarun2

* Fix socket timeout on Windows (patch by @GustavoLCR) ##socket

* Missing http.root is not a reason to not start the webserver ##http

* Fix r2 -C, =!=0, replace curl with r2 in the webserver test ##http

* Honor anal.in/from/to in aae, optimize db/formats/mach0/thumb ##anal

* Bug fixes and performance improvements

Co-authored-by: pancake <pancake@nopcode.org>
2020-09-25 19:51:23 +08:00
pancake
f71ec729ba
Always register the derived CC from the reg profile ##anal (#17685) 2020-09-24 17:17:15 +02:00
Zi Fan
ea1151d143
Escape environment vars in the default rarun profile (#17441) ##debug 2020-09-07 11:16:57 +02:00
Zi Fan
ac126508d5
Fix debugger to run debuggee with original environment variables ##debug (#17116)
* Change `fork_and_ptraceme` to start debuggee with rarun2 profile on Linux & Mac
* Add two new commands `doe` and `doe!` to show and edit rarun2 startup profile
* Fix `r_run_parse` to read last line
2020-07-24 16:25:55 +08:00
pancake
d441baad62
Fix latest COVs, remove dead code and unnecessary global variables (#17231)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-22 19:37:31 +08:00
pancake
37e10ee7b0
Initial support for git tags in r2pm ##r2pm (#17178)
* Initial support for git tags in r2pm ##r2pm
* Use `r2-` as tag prefix instead of `v`

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-02 11:56:08 +08:00
pancake
d47aed440a
Fix covs from 2020-06-29 (#17184)
* Fix covs from 2020-06-29

* CIDs: 1293553 1408695 1430058 1430059 1430060
1430061 1430062 1430063 1430064 1430065 1430067

* More fixes

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 09:33:38 +08:00
pancake
f061b49c14
Fix all the covs (memleaks) reported the 15th of this month (#17163) 2020-06-29 09:40:35 +02:00
phakeobj
1abc5d0914
Bail early if path string is an empty string (#17126) 2020-06-27 23:03:44 +02:00
Riccardo Schirone
a64cd12951
Fix wrong type warning (#17123) 2020-06-22 13:06:45 +02:00
pancake
bd9a604a87
Check for return values in about ~50 method calls (#17025) 2020-06-15 11:24:43 +02:00
pancake
84ecf9fff2
Fix all the coverities detected last month (#17060)
* Fix all the coverities detected last month

* Fix one more cov

* Fix build

* refix build

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-14 13:21:57 +02:00
pancake
5603366182
Be consistent and make all env vars start with R2_ (#16841) 2020-05-18 13:21:50 +02:00
Riccardo Schirone
c8f99840ab
r_core_seek accepts a boolean as 3rd argument (#16618)
Replaces all 0/1 passed as 3rd argument to r_core_seek with false/true.
2020-04-17 12:53:35 +02:00
pancake
bc09cba29a
Add r2 -NN to not load plugins ##core (#16415) 2020-04-05 15:02:46 +02:00
radare
5e4cdaaa04
Always use r_getopt, do not depend on libc (not just on windows) ##core (#16325) 2020-03-27 17:06:40 +01:00
Florian Märkl
fe825ca055
Use r_core_cmd_lines() for -c (#16290) ##core 2020-03-24 15:17:20 +01:00
radare
5e629a3260
Avoidify the strTrim() APIs + cleanup/refactor ##util (#16056) 2020-03-02 21:39:37 +01:00
Anton Kochkov
9ae41ae69f
Revert "Avoidify the RUtil.strTrim() APIs, rename trimHeadTail() and add asserts in RConfig ##refactor" (#16055)
This reverts commit 38b61c7bcf.
2020-02-26 09:59:04 +08:00
radare
38b61c7bcf
Avoidify the RUtil.strTrim() APIs, rename trimHeadTail() and add asserts in RConfig ##refactor 2020-02-25 17:53:09 +01:00
abcSup
6acd523a0d Refactor r_bin file hashes
* Add r_bin_file_compute_hashes
* Add r_bin_file_set_hashes
* Refactor it itj commands
* Introduce hashes method to RBinPlugin
2020-02-21 23:58:47 +01:00
Zi Fan
2c6fc43b7e
Add Authentihash support for PE (#15987) ##bin
* Add Certificate Table parser to PE plugin
* Add SpcIndirectDataContent ASN.1 structure parser
* Add Authentihash calculation and check
* Refactor r_bin_file_hash
* Add tests for Authentihash check
2020-02-20 21:03:16 +01:00
pancake
6a729b6678 Remove globals from main.r2 ##refactor 2020-02-17 16:52:28 +01:00
Khairul Azhar Kasmiran
88c9d34626
Terminate on missing script when doing radare2 -i -Q (#15918) 2020-02-03 20:15:03 +08:00
Anton Kochkov
f3a0a3d01c Some coverity fixes 2020-01-10 12:30:23 +01:00
Anton Kochkov
0c46c3e1e3 Some coverity fixes 2020-01-08 14:16:11 +01:00
radare
362e24892d
Fix #15331 - rabin2 -rk code injection issue (#15678) 2020-01-07 23:15:22 +01:00
Florian Märkl
7ed45aef31 Remove broken Threading Code from main for #12996 (#15554) 2019-12-09 10:27:14 +01:00
GustavoLCR
e43c9e7caf Fix some warnings (#15549) 2019-12-08 12:49:58 +01:00
Florian Märkl
70986cc3ce Partially decouple Tasks from RCore 2019-11-26 12:35:30 +01:00
David CARLIER
6ac2e30735 CPU affinity API introduction ##core 2019-11-05 10:21:13 +01:00
GustavoLCR
36114b35f3 Fix attaching to a pid on Windows (#15406) ##debug 2019-11-04 11:05:55 +01:00
Florian Märkl
80c74d7aa7 Replace r_str_const* with RStrConstPool (#15300)
* Add RStrConstPool

* Replace RAnal.consts with RStrConstPool

* Remove useless r_str_const() calls

* Kill more r_str_const()

* Remove r_str_const() from Java

* Remove r_str_const() from Canvas

* Remove r_str_const() from mach0

* Remove r_str_const() from PE

* Kill r_str_const* completely
2019-10-20 12:31:45 +02:00
pancake
6e0de66ee1 r2 -N disables utf8 2019-10-10 21:46:34 +02:00
Paul I
64a6baf0a9 Use abs path for LIBDIR and INCLUDEDIR on Windows (#15096) 2019-09-22 10:42:49 +02:00
dodococo
5cf107eccf Fix #14845: Support radare2_rc in radiff2 for graphs (#15078) ##diff 2019-09-20 12:24:15 +02:00
Paul I
78f2b12d0b Fix potential memleaks (#15057) 2019-09-17 02:14:32 +02:00
radare
69b6281a64
Fix #15002 - Propagate write error issues into RCore.patch ##io (#15029) 2019-09-13 18:28:26 +02:00
radare
48e4417646
Make -m do an implicit -s ##core (#15028) 2019-09-13 15:49:09 +02:00
pancake
e5ab37483c Fix #14898 - Show warning when -B used on unknown binaries ##bin 2019-08-29 19:29:52 +02:00
radare
17a9f66900
Add support for io-plugin initialization via null system command =! (#14915) ##io
* Useful for r2frida to automatically run .=!i*
2019-08-28 02:34:59 +02:00
dodococo
314ff0e19d Fixes ##14834 fix = breaking term config (#14881) 2019-08-24 11:18:32 +02:00
GustavoLCR
d38084fa9e Fix coredump PC not being considered (again) (#14836) 2019-08-18 22:44:41 +02:00
radare
d34ee687d6
Initial implementation of calling the r*2 commands natively from inside r2 ##core
(still far from complete but we need to go forward and kill all the globals \o/)
PD: the broken test is because initializing RCons twice
2019-07-10 18:45:20 +02:00
pancake
c14e235e0f Add -qq to force quit. Avoid the -qcq confusion ##core 2019-07-02 03:24:37 +02:00
pancake
9b7dcd30a9 Simplify RConfig.eval and improve e with e, for csv ##core 2019-06-20 10:30:52 +02:00