Commit Graph

1824 Commits

Author SHA1 Message Date
pancake
dce703d88b Fix static linking 2019-04-02 16:02:31 +02:00
pancake
4cae6b6558 Fix Android build and a lonely warning 2019-04-02 15:50:19 +02:00
pancake
3d0eb2eeee Fix makefile issue 2019-04-02 15:40:51 +02:00
radare
82416b0212
Create libr_main and make all binaries use it ##core
* Cleanup the use of getopt with our wrapper
2019-03-08 14:22:59 +01:00
Vasilij Schneidermann
e39c9424aa Make -x behave like /x unless mask is provided ##search 2019-03-05 20:28:31 +01:00
pancake
a3bb6132ba Implement rasm2 -x to output in hex dwords ##asm
$ rasm2 -x 'nop;nop;mov eax, 33;push ebx;int 0x80;nop;mov rbx,48484;nop'
	0x21b89090 0x53000000 0x489080cd 0xbd64c3c7 0x00900000

As suggested in https://twitter.com/travisgoodspeed/status/1101966927688318978
2019-03-03 02:51:55 +01:00
Riccardo Schirone
afae8b6e34
Prerelease travis release (#13189)
* Add additional tests for release/prereleases
* Test different plugins configurations
* Add some libraries to docker image
* Disable SYS_CAPSTONE for now because there is only 3.0.5
* Fix html magic file to respect libmagic's format too

< can be used with string so it should be escaped if we want to match
the exact string "<html>"

* Use plugin License when printing rasm2 plugins in JSON format
* Build with system capstone, but do not run tests because they would fail
* Fix tiny plugins file to use xtr_fatmach0 instead of just fatmach0
* Use clang to compile with ASAN
* Use b_lundef=false
* Just test if different plugins configuration build, no r2r
* Use sys openssl as well
2019-02-28 16:58:09 +01:00
David CARLIER
88b8bb7f3a Few code changes, possible errors. (#13192) 2019-02-25 11:28:28 +01:00
GustavoLCR
55cd22731e Fix path with spaces problem in windows (#13144) 2019-02-18 18:31:12 +01:00
radare
73f76a99b2
Make RCons.is_interactive() into the RConsContext and improve loading projects in tasks ##cons (#13132) 2019-02-18 06:20:01 +01:00
GustavoLCR
a795cd647c Do not escape path to Windows file (#13108) 2019-02-15 18:22:48 +01:00
David CARLIER
14c134d97a Little cleanup before release (#13115) 2019-02-15 18:12:44 +01:00
David CARLIER
58ba3a663d Various little code fixes. (#13075) 2019-02-14 10:40:38 +01:00
Florian Märkl
fb2682a16f Disable (with warning) -t and deobfuscate -n variable ##main 2019-02-12 18:13:45 +01:00
pancake
1936f2d047 Update plugins.nogpl.cfg and fix a couple of warnings 2019-02-11 12:18:23 +01:00
Deepak Chethan
99ecf7950b Use pj api in rasm2 2019-02-10 23:37:27 +01:00
pancake
92e4256c19 Change -T behaviour and rename iF into it ##bin 2019-02-10 02:30:07 +01:00
David CARLIER
cebf7f6938 Compute hashes only with a new r2 flag ##bin 2019-02-10 02:11:25 +01:00
Rahul Sangwan
39dea00faa Update ragg2 man page ##ragg2 2019-02-10 01:28:35 +01:00
Rahul Sangwan
be654b89d3 Unescape chars when using rax2 -S
this commit resolve second part of #12862 (#12985)
2019-02-08 16:37:42 +01:00
Deepak Chethan
7e5f4e47a5 Added the append string feature for ragg2 ##ragg2 2019-02-06 17:07:43 +01:00
pancake
75354b4587 Fix warnings 2019-02-05 00:35:01 +01:00
GustavoLCR
c1d0e59d4d Fix rabin2 extract path for Windows ##bin 2019-02-04 15:55:06 -06:00
pancake
0939198515 Use pj in rasm2.c and add pj_f for float 2019-02-04 16:40:57 +01:00
pancake
0daae3d9af Remove R_ASM_BUFSIZE, all buffers are now dynamic ##asm 2019-02-04 00:23:40 +01:00
pancake
00fb2f4607 Remove global variables in rasm2.c ##refactoring 2019-02-04 00:22:49 +01:00
Riccardo Schirone
e5b4d9294c Use RSpaces in RFlag ##refactor 2019-02-03 09:06:45 -06:00
David CARLIER
5d698c76ae Display file hashes into rabin via new mode ##bin 2019-02-01 17:11:31 -06:00
Deepak Chethan
f087bcfbb0 Removed duplicated -q flag in ragg2's usage message (#12964) 2019-01-31 10:55:17 -06:00
Maijin
f9d4ab6f65
Add Certificates in rabin2 ##enhancement (#12900) 2019-01-24 17:22:53 +01:00
David CARLIER
3cff12a7c0 Add iF to show file hash and related refactoring ##bin 2019-01-24 17:34:00 +08:00
Khairul Azhar Kasmiran
01d5dfe306 Fix rafind2 -S for UTF8 chars > U+00ff (#12866)
* Fix rafind2 -S for UTF8 chars > U+00ff

* Use '< 1' instead of '== 0'

* Remove unnecessary else

* Add a 0
2019-01-22 09:43:10 +01:00
Maijin
8f94d413cd Standardize version using blob_version ##refactor 2019-01-12 22:22:43 +01:00
Maijin
c45e3d4123
Change eprintf to printf in rarun2
Change eprintf to printf in rarun2
2019-01-12 12:29:39 +01:00
David CARLIER
de40266908 Add basic auth to the webserver ##sync 2019-01-10 10:51:51 +01:00
radare
d1d9404907
Implement /s, /s* to search for sections depending on entropy ##search 2019-01-03 15:22:26 +01:00
David CARLIER
2eb706029c Few code/cleanups mem leaks potential (#12591) 2018-12-31 00:21:47 +01:00
dav1901
d05a119081 Fix few minor leaks (#12584) 2018-12-30 01:37:14 +01:00
GustavoLCR
7530895d0a Fix a few clang scan-build bugs (#12562)
* Removed unnecessary variable from libr/core/disasm.c
* Removed not necessary assignment in libr/core/casm.c
* Removed not used assignment in libr/bin/dwarf.c
* Rem. duplicate declaration and not used values
* Fixed potential memory leak in java/class.c
* Fixed potential memory leak in ragg2
* Removed unnecessary variable in visual.c
* Another potential memory leak in class.c
* Removed not used value assignment
* Fixed memory leak in dwarf.c
* Removed not needed assignments
* Remove more not used assignments
* Refactored where bin_sections gets arch & bits for clarity
* Removed more assignments that are not used
* Rem. more unused assignments
* Surround assignment with paranthesis
2018-12-26 12:54:12 +01:00
r4dix10
ad4013932d Issue #10780 -o for octal string to character (#12561) 2018-12-25 23:24:41 +01:00
dav1901
303a57bb85 Minor code cleanups/fixes (#12519) 2018-12-20 11:50:29 +01:00
iamahuman
a54dbe914b Support r2core.js for Emscripten >=v1.37.24 (#12502)
* Support r2core.js for Emscripten >=v1.37.24

cwrap needs to be exported explicitly via EXTRA_EXPORTED_RUNTIME_METHODS
+ allocate larger memory, allow for growth and no aborting malloc

* wasm_asm was wrongly also included in anal.wasm

This causes link errors where duplicate symbols aren't allowed.

* supply wasm plugin to suppress meta arch warning

r2 core initializes itself for the current architecture until one is
explicitly specified (e.g. loading a binary).  Since asm.wasm and
arch.wasm isn't supplied by default, r2 when built for WebAssembly
emits some ugly warnings when loading.  Besides, those modules
(incl. bin.wasm) aren't that large.

* r2core: Make it possible to know when init is done
2018-12-17 11:55:44 +01:00
radare
7060103292
Improve RBuffer api, start to refactor rbin to use more rbuf ##bin (#12495)
- Added a new rule in the DEVELOPERS.md file
2018-12-17 11:54:46 +01:00
dav1901
ede39f120c Fix few build compiler warnings (#12490) 2018-12-16 14:54:40 +01:00
dav1901
5b644dcb74 Minor cleanups/fixes (#12478) 2018-12-14 00:17:50 +01:00
dav1901
97b94b3f94 Fix more clang warnings (#12458) 2018-12-12 12:22:36 +01:00
David CARLIER
384fe0f903 Silencing/fixing clang warnings. (#12430) 2018-12-10 00:04:21 +01:00
pancake
64f2e25c3a Fix #12405 - Handle ^C in radiff2 -x 2018-12-05 12:41:44 +01:00
dav1901
ab17935659 Fix clang warnings (#12413) 2018-12-05 12:35:37 +01:00
pancake
0cbd616e3b Fix posix shell regrssion in r2pm -s 2018-12-05 12:26:00 +01:00
radare
a3d181a8a0
Fixes spotted by clang-analyzer (#12391) 2018-12-04 10:45:46 +01:00
David CARLIER
138ca20e27 Couple of mem leak fixes. (#12355) 2018-11-29 17:04:24 +01:00
David CARLIER
d5a42c5c0c Fix use after free in radare2. (#12332)
We need the path a little bit longer.
2018-11-26 22:13:32 +01:00
dav1901
a6b44e03fe Fix warnings (#12309) 2018-11-25 01:46:57 +01:00
Riccardo Schirone
300844fa51 Introduce RBinArchOptions to avoid creating fake RBinFile/Objects ##bin 2018-11-22 15:14:37 +01:00
David CARLIER
3d830a3832 Couple of leak fixes 2018-11-15 16:34:11 +01:00
Riccardo Schirone
79edcb32f5
Make sure only one RBinObject is created for each RBinFile (#12169) 2018-11-15 11:44:46 +01:00
lzutao
50320592a6 Fix #12060 and #12072 - Rewrite r_num_abs and r_num_units ##core
r_num_abs:

- Make r_num_abs static inline
- Use unsigned long long type when defining TB macro
- Use st64 instead of long long

r_num_units:

- Add len argument for buf in r_num_units
- Add PB and EB for r_num_units
- Always display one number after decimal point

  * This change simplifies the code
- Use long double type as assigning from ut64 to double cause data loss

r_num_tail_base:

- Use isxdigit (fast) instead of isHexDigit (slower)
- Rename nth to get_nth_nibble

Update all functions to use with new r_num_units:

- Remove side effect when using in other functions like cb_printf

* Trim trailing .0 when input is power of 2
2018-11-14 23:35:44 +01:00
Christopher Hewitt
451c76c71d Open radare2 project after loading plugins and keep the -e flags ##projects 2018-11-14 22:31:02 +01:00
pancake
701ecb2835 More include fixes 2018-11-14 13:12:34 +01:00
Artem Zinenko
4a2bc97a35 Fix #11918 - Moved r_print.h into r_util/r_print.h 2018-11-14 10:54:22 +01:00
Riccardo Schirone
f77ecfb357 Upgrade SDB and use the new HtPP, HtUP, HtUU ##refactoring
* sdb-sync: update to commit ea05ca8808605daa683a2b35f143e24c3a70f0c9
2018-11-14 10:47:28 +01:00
Riccardo Schirone
90058945d2 Remove "referenced" from RBinObject and remove get_object ##refactoring 2018-11-13 13:05:18 +01:00
Paweł Łukasik
22ff13e069 Add dbg.verbose variable to show more info when debugging ##debug 2018-11-13 02:10:21 +01:00
Riccardo Schirone
08e5b4aaad Refactoring RBin.open/close and RBinOptions ##bin
* r_bin_close should be r_bin_file_close
* moved bin/open.c into bin.c
* set BinFile id in r_bin_load_io
* use r_bin_open_io instead of r_bin_load_io
* also prefer RBinOptions instead of multiple arguments
* rename r_bin_load to r_bin_open and use RBinOptions
2018-11-07 17:22:41 +01:00
radare
71053f17e9
Move trie, mixed, slist into Sdb's Attic, and DES from util to crypto ##refactor 2018-11-07 17:18:14 +01:00
pancake
3e98d0f778 Fix #11237 - Handle -@ in rasm2 as an alias for -o 2018-10-31 11:45:50 +01:00
a1ext
4e8e7de7b4 Fix unicode path issues in Windows ##windows 2018-10-30 01:04:47 +01:00
David CARLIER
4597224d7d Fix r2agent segfault. (#11950)
Since it s based on reference counting, it is safe to make sure the context is initialised.
2018-10-26 13:21:12 +02:00
Sajjad Pourali
503844ac77 Fix MacOS Mojave User Debugging Problem ##build 2018-10-25 23:42:47 +02:00
Maijin
337dd0d909
Remove Sf command ##refactoring 2018-10-25 21:20:16 +02:00
Riccardo Schirone
6115f00455
remove r_bin_load_io2 and rename MODE defines ##refactor
PR #11888 

* bin: no need for 2 r_bin_load_io APIs
* bin: remove io-related unused functions
* r_bin.h: remove some old comments
* r_bin.h: group together related APIs
* extract print/set modes in r_types, to remove dups in r_bin and r_core
* clang-format-diff: fix ternary operator indent for pancake
2018-10-24 16:54:57 +02:00
pancake
9f896002ba Fix macos-sign 2018-10-22 20:03:39 +02:00
pancake
f60ca729fb Just add -static in linux 2018-10-22 19:57:45 +02:00
pancake
a6a6d34718 Add -static for the binaries when --with-libr ##build 2018-10-22 15:16:52 +02:00
pancake
f97aded52a Statically link the binaries when using --with-libr 2018-10-22 15:10:29 +02:00
Riccardo Schirone
64d16fc506 Some code cleanup and asserts in RBin ##refactor
* libr/bin: no need to allocate RBinOptions on the heap
* bin: start using r_return_* around, that's just the beginning
* bin: remove io_owned since it's not used anywhere
* io: make r_io_bind return nothing
* bin: remove unused functions and simplify r_bin_load_io
r_bin_load_io was calling r_bin_load_io2 with UT64_MAX as sz parameter,
but r_bin_load_io2 just returns false if (st64)sz is less than 0, so
that call is actually useless and can be removed.
* bin/bin: fix some preconditions
* bin/open: fix precondition to check for bin and filename too
2018-10-21 01:27:15 +02:00
pancake
fd0ab00b14 Fix static blob build for android and disable libuv ##build 2018-10-20 20:10:17 +02:00
pancake
a33fc03725 Fix visual panels glitch and handle 's' in zoom mode ##visual
* And remove dead code
2018-10-20 02:12:30 +02:00
radare
9beda2f60f
Allow multiple packages as arguments for r2pm -i,-c,-ci ##tools (#11843) 2018-10-18 10:10:35 +02:00
pancake
2142a8a992 Fix build 2018-10-15 20:48:24 +02:00
pancake
de525b09d8 Add missing r_hash dependency for rafind2 2018-10-15 20:47:41 +02:00
radare
c8356abb03
Add zign hash using sha256 (#11822) 2018-10-15 19:13:18 +02:00
Riccardo Schirone
6c462b3ecc rafind2: avoid memleaks (#11817) 2018-10-15 16:18:51 +02:00
bannsec
e56d3de4ab Fix memleaks in ragg2 (#11788) 2018-10-12 12:18:22 +02:00
Riccardo Schirone
ab4578a546
remove random warnings when compiling (#11767)
* remove random warnings when compiling

* debug_native: provide r_debug_handle_signals on windows
2018-10-08 13:21:50 +02:00
pancake
c4395fd8ee Fix #10290 - Support R2_ and without prefix in r2 -H 2018-10-08 00:43:40 +02:00
pancake
b151764ffe Support tar and fix clean in r2pm 2018-10-07 00:18:26 +02:00
David CARLIER
036db696d1 Fix couple of leaks. (#11716) 2018-10-02 15:24:27 +02:00
David CARLIER
da3d1bb4cc Fixing few leaks. (#11707) 2018-10-02 00:21:29 +02:00
radare
f7be81edbb
Fix instruments leaks (#11695)
* Fix a small memleak in the disasm reflines
* Fix huge args leaks in r_parse for arm
* Fix another memleak
* Fix memleak in VR
* Fix memleak related to bad use of r_list_join
* Fix warnings
* Fix two rlist related asserts
2018-10-01 19:57:33 +02:00
bannsec
4188860216 Memory Leak (no path free) in rasm2 (#11703)
Small memory leak in rasm2.
2018-10-01 09:29:03 +02:00
bannsec
8b6feae97b Memleak (#11688)
* Memleak

Guessing this is where the free should go... Ref #11687
2018-10-01 09:14:11 +02:00
David CARLIER
79871d4164 Fix #11671 (#11673)
Using macro for regex module too.
2018-09-27 11:16:44 -07:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
pancake
798ef9519e Detect error when something fails in binr/ 2018-09-22 11:31:45 +02:00
radare
478dd2377a
Fix #11566 - Regression in r2 = introduced by threading and siol (#11598)
Still not perfect because stdin works, but the tty size/configuration
is not correct when reopening.
2018-09-21 00:13:19 +02:00
pancake
d34ada1a05 Minor fixes for mach0 signature parsing, fix crash in ae? and other null derefs 2018-09-18 11:06:00 +02:00
David CARLIER
acdb507945 core file: fix couple of leaks (#11571) 2018-09-18 13:16:44 +08:00
morbith-dqtz
5c6b976343 linux_heap_glibc: refactor (#11541) 2018-09-17 02:00:39 +02:00