27 Commits

Author SHA1 Message Date
pancake
e6f2cd0b2a
Remove trailing spaces (#19460)
$ git grep ' $' | grep -v ^test/ | cut -d : -f 1 | sort -u > /tmp/trailing
$ for a in `cat /tmp/trailing` ; do sed -i -e 's/ *$//' $a ; done
2021-12-02 17:39:59 +01:00
pancake
c90696c089
Random code cleanup in RCore 2021-10-28 12:19:02 +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
radare
69b6281a64
Fix #15002 - Propagate write error issues into RCore.patch ##io (#15029) 2019-09-13 18:28:26 +02:00
Riccardo Schirone
66f7403245 Rewrite the RBuffer API to make it safer and adjust the codebase ##refactor (#13656)
* Reimplement r_buf_fread/fwrite
* Add slice buffer and introduce readonly field
* Do nothing if size is 0
* Prevents an overflow when 8 is subtracted from size.
* Fix ragg2 when patching outside currently existing buffer
* Implement r_mem_mmap_resize for systems where mremap is not defined
* r_buf_buffer can be called with no size arg as well
* Use size_t instead of ut64
2019-05-15 15:34:06 +02:00
Riccardo Schirone
820e3dbe73
Improve r_buf_buffer and remove r_buf_get_at (#13676)
* Make r_buf_buffer return a ut8 and the associated size of the buffer
* Remove r_buf_get_at uses and make it static
2019-04-15 13:24:15 +02:00
guy-gal
c68988dc50 Add support to multiline assembly patching (#13526)
For example, this line 'OFFSET : nop;nop;nop' (provided in the example patchfile at binr/rabin2/patch.txt) now actually works
2019-03-28 10:05:51 +01:00
Riccardo Schirone
3f4580b031
Make buf field private in RBuffer (#13473)
* Fix pemixed build (and include it in meson build)
* Do not use base_priv in yank, it was wrongly used.
2019-03-26 20:32:53 +01:00
Riccardo Schirone
0948f9536b
Use r_buf_size to get the size of a buffer, not the private field (#13380)
* Use r_buf_size to get the size of a buffer, not the private field
* Use r_buf_seek instead of adjusting the private cur RBuffer field
* use r_buf_read instead of r_buf_read_at(.., cur, ..)
* Fix RBuffer usage in REgg
* Introduce r_buf_tell API instead of using seek
* write_at(cur) == write
2019-03-15 20:28:52 +01:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Anton Kochkov
b99733b627 Fix more coverities 2017-10-02 21:31:31 +08:00
Giovanni
6fe6564b8d Fixed 8 coverity bugs (#8305)
* 1372278 Identical code for different branches
* 1372276 Dereference after null check
* 1372273 Logically dead code
DEAD CODE. i must be between 1 and 9.
* 1372272 Logically dead code
At condition 64U - slen > 64U, the value of slen must be between 1 and 63.
At condition 64U - slen > 64U, the value of slen cannot be equal to 0.
The condition 64U - slen > 64U cannot be true.
* 1372265 Dereference after null check
* 1372264 Logically dead code
* 1372262 Logically dead code
* 1372258 Logically dead code
* 1372257 Unchecked return value
2017-08-25 18:12:12 +02:00
BlueC0re
59787b8ccf added v modifier to rapatch similar to wv (#7806)
usage:

0 v4 40000
4 v2 300
2017-06-22 20:29:10 -05:00
pancake
ad1a73a2e9 Reindent a bit more 2016-10-26 23:16:31 +02:00
pancake
41d12ff98b Fix #2880 - Fix crash in rapatch (r2 -P) 2015-07-08 14:21:43 +02:00
pancake
cf664a9f22 Better r2 -P and refactor 'r_core_patch' to accept a string instead of file name 2014-09-03 23:00:38 +02:00
pancake
a55a29459e Add missing file 2014-05-28 14:57:43 +02:00
pancake
6f652c461a Fix coverity bugs 2013-12-18 23:58:05 +01:00
pancake
65fed9b9a0 Handle '-' in 'w' commands, support comments in wF, Fixes in wp 2013-09-04 02:31:14 +02:00
pancake
fc9301b14b Add hints and named print formats and more
Initial implementation of anal hints (ah?)
Use anal hints in core/disasm. Needs more work
New data structure StrHT (string hashtable)
Simplify core/libs.c with cpp macros
Added r_cons_color() wip function for ansi256 consoles
RPrint no longer depends on r_cons
Sort 'a?' help commands
Add support for named print formats with pf$ command
Add support for 64 bit string pointers in 'pf' ('S')
Add r_print_mute and r_print_format_length functions
Bump r2 nodejs bindings version number
Merge r_print into r_util
2013-01-22 05:06:12 +01:00
pancake
e48b9b2f30 Add cfg.sandbox functionality
f.example: $ r2 -c=H -e cfg.sandbox=true -
2012-10-20 00:31:18 +02:00
pancake
46e29afb98 Initial working web ui: r2 -c =H /bin/ls
Autodetect osx, win, linux and android browsers
Default port is 9090
Add support for local networking in RSocket
Add r_str_unescape() helper function
Fix htmlgraph.sh script.
Added wwwroot in shlr/www
Swap eval/cmd load order in r2
Add r_core_cmd_str_pipe()
Use RCons in 'fs'
2012-09-06 03:12:54 +02:00
pancake
f908b15fb5 * Fix android compilation
- Fix static build
  - Fix dupped symbols
* Fix all errors reported by clang-analyzer
  - Some null dereferences
  - Some uninitialized variable uses
* Fix all important warnings from the farm
  - Remove *all* uses of alloca
  - Fix many %llx format string portability issues
* Fix manpage typos reported by lintian (thanks sre)
2011-12-06 00:27:57 +01:00
pancake
ac7f96bb0c * Add ragg2 -p to specify a padding
- Use the new r_egg_padding function
* Add support for continuations in rapatch2 '+' char
* Fix malloc(0) thanks to llvm's scan-build
* Fix build
2011-11-13 05:26:07 +01:00
pancake
4ea6ee9873 * Add new flags to r2
- -D : enable debugger mode for non native debuggers
  - -c cmd : execute a command before showing prompt
* Initial import of the bfvm (brainfuck virtual machine)
* Initial dummy implementation of the brainfuck debugger plugin
  - Needs to be integrated with bfvm to work
* Added doc/brainfuck
2011-10-07 03:10:44 +02:00
pancake
23936cfbe5 * Add an REgg instance into the RCore class
- Make r2 -P use the r_egg api instead of the oldie rarc2
2011-10-04 10:10:00 +02:00
pancake
0357ddf18e * Move rapatch into r_core_rapatch (r2 -P)
- Remove r_core deps from rabin2
  - Accessible via 'wp'
* Fix build check of test program in r_db
* Pass CFLAGS/LDFLAGS to sdb build
* Add rax2 -k to not change base
2011-09-09 09:49:55 +02:00