Commit Graph

160 Commits

Author SHA1 Message Date
pancake
b531513e96
Implement fine grained sandbox control ##security 2021-12-20 14:58:51 +01:00
pancake
3aef52cae0 Fix issues in r2pm -i acr and the new compiler checks 2021-12-17 10:26:41 +01:00
pancake
93f6b4cd3b
Initial work towards supporting mingw32/64 again ##build 2021-10-18 23:58:16 +02:00
pancake
c2e064de08
Detect canary on statically linked RT and stripped PEs ##bin
* Add tests and support 32 and 64bit canaries
2021-09-29 12:08:50 +02:00
pancake
34d5c13776 Fix last covs 2021-09-17 01:59:44 +02:00
pancake
4d2be3830f
Initial import of the isotp:// plugin ##io 2021-09-16 12:53:23 +02:00
pancake
4fba588f0f Disable networking and libmagic widechar support for SerenityOS for now 2021-07-07 19:19:10 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build 2021-06-20 17:14:43 +02:00
pancake
7de0a602bf
Implement socket:// plugin, inspired by radare1 ##io (#18740) 2021-05-24 14:16:23 +02:00
pancake
9282d35830 Fix double free in unix connect 2021-03-30 00:08:32 +02:00
pancake
38689963ad Fix more issues in RSocket.printf affecting the webserver ##socket 2021-02-06 22:29:39 +01:00
pancake
9fceb7a9d5 Fix r_socket_printf for big buffers ##socket 2021-02-06 01:37:50 +01:00
pancake
51145a117a Fix some of the last coverities related to UAF and OOBREAD 2021-01-25 03:08:33 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
GustavoLCR
623c4819d6
Fix some warnings in WinDBG plugin (#17784) 2020-10-14 14:51:11 +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
Keegan S
36e9314832
Fix #17638 - Fix http server by using TCP in RSocket's protocol ##remote (#17641)
Co-authored-by: meme <meme@users.noreply.github.com>
2020-09-15 11:22:04 +02:00
Riccardo Schirone
2318e1afcc Use SSL_get_error only if SSL is being used 2020-09-09 15:39:33 +02:00
pancake
052f97dd24
Fix #17506 - r2 http://example.org works again ##io (#17514) 2020-09-04 16:01:03 +02:00
Zi Fan
0ba897f5c9
Add network support for WinDbg/KD (KDNET) ##debug (#17340)
* Add network support for WinDbg/KD (KDNET) ##debug
* Add iob_net io_backend plugin for shlr/winkd
* Add Windows 10 (May 2019 Update) build 18362 profile
* Add r_hash_do_hmac_sha256 function to r_hash
* Change r_socket_connect to bind source port for UDP connection
2020-08-26 10:24:20 +08:00
GustavoLCR
04edfa82c1
Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being created without a protocol
* Fix socket connect with SSL ##socket
* Use select() in r_socket_ready()
* Fix read failing if received only protocol answer
* Fix double-free
* r_socket_http_get: Fail if req. SSL with no support
* Follow redirects in r_socket_http_answer()
* Fix r_socket_http_get result length with R2_CURL=1
* Also follow redirects
* Avoid using curl for downloading PDBs
* Use r_socket_http_get() on UNIXs
* Use WinINet API on Windows for r_socket_http_get()
* Fix command injection
* Fix r_sys_cmd_str_full output for binary data
* Validate GUID on PDB download
* Pass depth to socket_http_get_recursive()
* Remove 'r_' and '__' from static function names
* Fix is_valid_guid
* Fix for comments
2020-06-10 18:00:00 +02:00
Yusef Karim
6a0d90d2f5
Create writefds set to fix socket timeout in r_socket_connect (fixes #16788) (#16946)
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2020-05-25 14:24:06 +08:00
pancake
54617455de
Initial refactoring of the rap:// protocol (-75 LOC) ##socket (#16534)
* It's implemented in IO, Socket and Core
* Remove duplicated apis and defines, everything in in RSocket now
* RIO now owns an RCoreBind instead of 3 fcn pointers + 1 void*
* Use proper filenames in libr/socket following public api names
* Use RSocket.block apis in the rap client + server apis
2020-04-12 16:40:55 +02:00
yossizap
778c42cfa7
Fix socket connection issue (#16218) ##socket
PR #16073 exposed that the linux implementation of r_socket_is_connected
returned -1 from recv with errno set to EAGAIN. This broke gdbr and
probably other remote capabilities since r_socket_connect would fail.
I switched the implementation to getsockopt which is more reliable
instaed of playing with non blocking settings.
2020-03-15 11:56:55 +01:00
radare
6ae8806411
Do not use the elvis operator for bool expressions (#16073) 2020-02-28 15:19:37 +01:00
yossizap
ebfbf1a039 Fix r_socket_connect not using the given timeout in unix ##network
Connect isn't effected by r_socket_block_time since it can only change the
timeout of read(and not implemented, write) actions with setsockopt.
Also, connect may wait for an unspecified amount of time so we have to use
select.
2019-11-18 01:38:08 +01:00
dok
34e4bd7291 Use sigaction instead of signal ##core 2019-11-06 12:41:36 +01:00
Paul I
016c1f73cb Add R_INVALID_SOCKET macro (#15094) 2019-09-22 00:32:35 +02:00
pancake
2f9acaeead Minor function signature fixes 2019-07-15 16:22:20 +02:00
pancake
3b2aceaaac Add usec precission for RSocket.blocTime() and improve r2web:// a bit 2019-05-31 15:24:51 +02:00
pancake
073fcca0f3 Make -C http work like the tcp and rap remotes, expose the shell via == ##remote 2019-05-17 12:09:23 +02:00
pancake
10109fec62 Fix issues with the tcp server .: and =+tcp, use index instead of fd ##remote 2019-05-17 01:04:31 +02:00
radare
51cc15072a
Fix some UAF in rap server, handle HTTP over rap and tcp properly ##remote (#14081) 2019-05-16 14:18:16 +02:00
radare
e04f31a313
Completely kill the msvc/ directory and the unix-specific includes workarounds 2019-03-19 17:34:02 +01:00
pancake
c80dbc6e9a Fix http webserver regression introduced in 81ad0fe809 2019-03-15 19:42:13 +01:00
Anton Kochkov
bb67b54f74
Remove CYGWIN & MINGW remnants (#13377) 2019-03-15 12:55:08 +08:00
GustavoLCR
81ad0fe809 Fix #13234 - Allow reopening of webserver ##sync
* Fix hang after ctrl-c
2019-03-06 04:43:32 +01:00
radare
32e494a696
Improve rap:// code, r2p_ is now r2pipe_ ##io (#12699) 2019-01-09 02:47:35 +01:00
iamahuman
51ab0994c6 Add missing net stub r_socket_accept_timeout 2018-12-15 18:32:24 +01:00
pancake
214baa4856 Fix null deref in RSocket.free when compiled with SSL 2018-11-28 11:53:27 +01:00
dav1901
a18fe42d96 Minor cleanups/fixes (#12256) 2018-11-22 15:14:59 +01:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
radare
a00d09e5d0
Fixes for winedbg spawn (#10486) 2018-06-25 14:53:25 +02:00
Florian Märkl
2202d14067 Timeout socket accept using select (#10415) 2018-06-20 11:20:55 +02:00
Florian Märkl
c1cdc7a8b6 Add timeout for accept in HTTP Server (#10375) 2018-06-18 01:32:24 +02:00
pancake
0b1e8eaecc Fix almost all warnings from the msvc build 2017-12-19 00:18:39 +01:00
pancake
0851129765 Implement r_cons_readchar_timeout. wink wink 2017-12-18 02:44:51 +01:00
xarkes
410ca09803
Added dynamic linking build for Appveyor (#8948)
* Revert "Enable GDB for Windows (#8877)"
Because it does not work while linking dynamically on windows
This reverts commit 12b9d8c3b4.
* Added dynamic linking build for Appveyor
* Try cleaning Windows linkage (meson)
2017-12-03 21:26:13 +01:00
Anton Kochkov
bd4ad8b0a4 Fix Windows build 2017-09-27 10:18:48 +08:00
pancake
97911069b3 Initial port of io.winedbg using the new r_socket_spawn() api 2017-09-27 03:12:00 +02:00