2852 Commits

Author SHA1 Message Date
pancake
b77d97a6a9 Improve str.wrap, add cons.line and fix cons.printat glitch ##cons 2020-12-23 23:14:07 +01:00
Lazula
f2976d3c7e
Use r_str_get_fail() throughout codebase ##refactor (#18079) 2020-12-21 08:51:44 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
Liumeo
8c742b28f0
Fix arm32 db/cmd/cmd_pc (#18053) 2020-12-20 19:56:27 +01:00
pancake
d813cf19ca
Add r_str_wrap() and r_cons_printat() new APIs needed by r2book ##cons 2020-12-20 14:10:21 +01:00
Liumeo
1491be12b6
Fix arm32 db/cmd/cmd_i (#18056) 2020-12-19 09:59:30 +01:00
gogo2464
38e33288fb
Refactor to move RCharset from RCore to RPrint (#18059) 2020-12-18 22:13:03 +01:00
Lazula
4a1a624318
Clean up r_num ##util ##refactor (#18049)
* Fix function spacing for r_num functions
* Remove r_num_ntohs
* Rename r_num_to_trits to r_num_to_ternary for
  consistency with surrounding code
* Rename trits to ternary in other files
* Fix spacing in test_contrbtree.c
2020-12-17 22:24:27 +01:00
pancake
aaa930ab26
Improve and formalize r_name_check() along all the base ##core (#18020) 2020-12-16 14:49:50 +01:00
pancake
2f4888b003
Add r_str_escape_r2 helper function ##util (#17707) 2020-12-16 13:56:19 +01:00
pancake
cb33fdb420 Improve code, add cfg.charset, use pse, add test ##print 2020-12-14 12:11:13 +01:00
gogo
f16168fa36 Initial implementation of custom charset encodings ##print 2020-12-14 12:11:13 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
condret
fbdc4f16dd add r_rbtree_cont_first 2020-12-13 02:43:13 +01:00
pancake
7df28e1fb2
Implement the comma command to manage user-defined tables ##util (#17702)
* Import export in CSV and R2 formats
* Export in JSON, ascii-art, columns, r2, ..
* For example: aaa;aflt>$a;,.$a,/size/sum
2020-12-09 03:39:49 +01:00
pancake
e356715589
drr show all flags and pxrj is now structured ##print (#17758)
* dxrj changed the field `ref` to `refstr`
2020-12-06 18:31:43 +01:00
GustavoLCR
0dcac185dc
Fix another UAF in skyline ##Refactor (#17972)
* Fix another UAF in skyline
* Simplify

* r_vector_insert() accepts assign at last index
* No need to check for parts that fit/overlap with new_part if new_part itself fitted inside a prev_part
2020-11-27 12:23:44 +08:00
GustavoLCR
ee46646df8
Set realname for PDB flags (#17967) 2020-11-27 12:22:58 +08:00
GustavoLCR
d47616fc1b
Fix UAF in r_skyline_add() (#17965) 2020-11-24 03:41:41 +01:00
GustavoLCR
203878e60e
Optimize io.cache ##io (#17952)
* Add RSkyline ##util
* Add `r_vector_len()`
* Optimize io.cache ##io
* Use RSkyline instead of RList
* Add cache skyline for faster reads
* Use PJ API in `wcj`
* Add test and fix
2020-11-23 12:36:32 +08:00
Paul I
890b19a1f6
Use offset info in r_type_get_struct_memb() (#17930) 2020-11-19 11:52:01 +08:00
Anton Kochkov
5da1b3b076 Fix some warnings 2020-11-16 18:56:21 +08:00
Liumeo
d9000c0214
Fix ctime/asctime and refactor r_asctime_r ##refactor (#17911) 2020-11-12 12:25:33 +08:00
Anton Kochkov
aaccc09828 Variadic argument fixes 2020-11-10 11:11:45 +08:00
Anton Kochkov
01ed730eac Fix Windows tests 2020-11-09 18:52:16 +08:00
GustavoLCR
a26f6c5656
Fix r_core_editor() on Windows (#17887) ##windows 2020-11-02 16:09:53 +01:00
condret
965b0fa4e0 Implement first/last/next/prev fd APIs ##io 2020-11-01 11:33:31 +01:00
pancake
d08ea37ae9 Code cleanup in R_IO 2020-11-01 11:33:31 +01:00
Hex
6ea0a08ecf
Add cfg.json.* encoding options (#17681) ##json 2020-10-27 11:46:27 +01:00
pancake
137fdd0821
Fix warning in the JSON parser (#17827)
json_parser.c: In function 'parse_value':
json_parser.c:240:9: warning: 'new_key' may be used uninitialized in this function [-Wmaybe-uninitialized]
     p = parse_value (js, new_key, p);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Co-authored-by: pancake <pancake@nopcode.org>
2020-10-26 14:07:15 +08:00
David CARLIER
5e9fd04843
Fixing r_sys_pid_to_path for DragonFlyBSD ##util (#17842)
Same API and approach as FreeBSD.
2020-10-26 13:56:26 +08:00
pancake
0279929704
Fix bugs and improve pxr (add pxr[1248][j] to override asm.bits) ##print 2020-10-25 12:35:45 +01:00
David CARLIER
b1996da031
Setting ASLR support for DragonFlyBSD ##util (#17810)
Enable calls for rarun2
2020-10-22 16:26:53 +08:00
pancake
6b6f88efd3
Speedup r2pipe-spawn: r2 -0 sets scr.prompt=0 do not autocomplete or log ##r2pipe (#17767) 2020-10-13 22:45:45 +02:00
Riccardo Schirone
1e58692071
Fix incorrect uses of printf-like functions ##refactor (#17648) 2020-10-13 16:26:15 +02:00
karliss
bdb88df38c
Graph refactor ##refactor (#17631)
* Support more output modes for class inheritence graph.
* Refactor codexrefs and importxrefs graphs.
* Add ag_w for the commands using new mechanism.
* Separate drawable graph from r_graph.
2020-10-06 10:57:51 +08:00
Riccardo Schirone
187f314c49
Unwrap quoted strings when passing args to newer handlers ##newshell (#17732)
* Unwrap quoted strings when passing args to newer handlers ##newshell

When a user wraps an argument, it means like in SH that he wants the
command to consider the argument as one single arg, even if composed by
multiple words. The same applies for r2newshell. So far we did not
unwrap quoted strings to maintain compatibility with old shell, but
doing this unwrapping is one of the nice feature of newshell.

* Add tests for quoting/unquoting

* Adjust tests with `w` for newshell/oldshell
2020-09-30 14:25:38 +08:00
Riccardo Schirone
c7b3dc9e65
Remove sig_t because not used (#17712) 2020-09-25 15:37:33 +02: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 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9

* 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
Riccardo Schirone
83d3e7bf18
Mark tests as broken until properly fixed (#17711)
* Mark http test as broken until properly fixed
* Fix return type of `signal`
* Mark V850 pseudo test as broken

Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-09-25 17:30:29 +08:00
pancake
7c76d85031 Add tests for RTable using r2 commands 2020-09-24 17:19:25 +02:00
pancake
e13753e6d0 Support strings in /ne/ and /eq/ RTable.filter ##util 2020-09-24 17:19:25 +02:00
pancake
6ce78c6149 Implement /head, /tail and /page in RTable API ##util 2020-09-24 17:19:25 +02:00
pancake
43ff1e4189 Support boolean columns in RTable ##util 2020-09-24 17:19:25 +02:00
pancake
454d7ada78 Support :simple in RTable.tostring() ##util 2020-09-24 17:19:25 +02:00
Damien Zammit
2a0d8fbe59
Install r2sdb, detect R2_HOME_SDB_FCNSIGN for r2extras custom CC ##build
* cc: Add autodetection for R2_HOME_SDB_FCNSIGN new location of custom calling conventions
* Fix r_file_exists not expanding tilde path
* r2sdb: Install executable
2020-09-24 12:26:53 +02:00
phakeobj
89e1618e3c
Fix #17353 - Remove duplicated implementation of uleb128 in mach0 ##bin (#17489) 2020-09-24 09:47:23 +02:00
Alexis Ehret
ec6a52e8a9
Fix 3 lgtm warnings (#17465) 2020-09-24 09:37:41 +02:00
Kārlis Seņko
7042ae727b Refactor r_str_split_lines to use size_t. 2020-09-21 07:48:17 +03:00
Riccardo Schirone
75a80741ee
Make root a argv RCmdDesc ##newshell (#17326) 2020-09-15 15:27:10 +02:00