Commit graph

398 commits

Author SHA1 Message Date
pancake
e94817a78b Fix PE bin strings offsets and types 2014-07-17 21:56:35 +02:00
pancake
cf64a5dd75 Fix #1117 - Bring back rabin2 -c 2014-07-17 09:40:35 +02:00
pancake
5ce3dd71ab Autodetect ARM thumb symbols and expand analysis. Tested on ELF/MACH0 2014-07-17 03:34:16 +02:00
pancake
178464ea36 Apply LemonBoy's patch to fix string offset in va 2014-07-14 00:06:00 +02:00
LemonBoy
10dc0c6ef4 Make the PE header return vaddrs relative to the image address 2014-07-11 23:32:44 +02:00
LemonBoy
e8dd114774 Re-enable the hack that makes the world tick, one day we'll get rid of that 2014-07-11 23:32:44 +02:00
LemonBoy
0acf0b1dd2 Various fixes to stop the vaddr translation madness 2014-07-11 23:32:44 +02:00
LemonBoy
fa75d37e7f Fix a tiny memory leak (hah) 2014-07-09 17:16:57 +02:00
jvoisin
b0375a3904 strchr takes the lowest 8 bits of that only so 0x10a would appear as 0x0a making it segfault when doing the array access
Kudos to TheLemonMan
2014-07-07 16:03:51 +02:00
LemonBoy
9208946109 Add support for UTF-8 and better WChar strings in RBin
- Better string recognition.
- Better wchar string detection
- UTF-8 helpers. Better string detection.
- Break on invalid sequences
- Fix the vaddr translation. Misc fixes
2014-06-30 16:39:24 +02:00
Jonathan Neuschäfer
9d8dbbd7e8 r_bin_reload: initialize len_bytes, avoid unpredictable allocation
The problem here is that r_io_desc_read checks out_sz, the argument
&len_bytes is passed as, and uses *out_sz as the number of bytes to
allocate unless its UT64_MAX.  So, instead of passing an uninitialized
value, initialized len_bytes to UT64_MAX.
2014-06-21 01:39:33 +02:00
Jonathan Neuschäfer
4c612db79b a few cleanups in bin and lang
* libr/bin/bin.c: remove duplicate condition (xtr && xtr)
* libr/bin/p/bin_elf.c!libs: use r_list_newf
* libr/lang/p/Makefile: add empty "clean" target to silence make warning
2014-06-14 02:14:08 +02:00
pancake
3e5eb05eda Fix PE exports parsing (adapted inisider patch) and some code cleanup 2014-06-13 16:00:39 +02:00
pancake
63ae19c650 Implement RBinInfo->is_stripped for MACH0 files 2014-06-10 20:50:48 +02:00
pancake
0ea452d0f5 Fix build 2014-06-06 00:06:30 +02:00
pancake
7322a152e1 Minor fix for search in iova 2014-06-05 04:14:37 +02:00
deeso
d82e709d0d fixed use after free possibility from r_bin_reload 2014-06-02 17:16:57 +02:00
Fedor Sakharov
3a0422db24 bin: Delete the list of objs instead of deleting current object
Fixes #971
2014-06-02 17:15:48 +02:00
pancake
8d663ceb94 Some rework on RBin.baddr and laddr to make it work again
Not all fileformats return correct data in Sections, this is
why sometimes the relocation with baddr (needed for aslr) fails
on mach0 for example. This code needs to be redesigned and fixed.
2014-05-29 00:49:28 +02:00
pancake
d65700dedd Fixes to make RBin/RIO more consistent for bindings 2014-05-28 18:58:53 +02:00
pancake
6266fc66c7 Minor fixes 2014-05-28 17:49:32 +02:00
pancake
810b976b73 More regression fixes for baddr on ELF and MACH0 2014-05-26 12:04:07 +02:00
pancake
576c9d6221 Fix ASLR (rabin2, r2 -B working again), sort i? output 2014-05-26 03:06:29 +02:00
pancake
5d9751e9e2 Remove global in RBin 2014-05-26 00:39:23 +02:00
pancake
8c0ed5a6ee Update capstone and embed it into the 'make dist' tarball 2014-05-25 03:58:58 +02:00
Adam Pridgen
e6f8c63b7a Debugger returned '0' for size and not UT64_MAX which was unexpected 2014-05-21 19:38:20 -05:00
pancake
29ee197638 Optimize RMeta.add() and bump sdb for updated optimizations 2014-05-22 02:15:26 +02:00
pancake
e7d3a629a5 Remove file size limit in RBin 2014-05-22 00:59:31 +02:00
pancake
ff939fd048 Implement #956 (rabin2 -k - prompt) and fix r_bin_load() 2014-05-22 00:12:30 +02:00
deeso
a702c82ac8 Enhance performance with reduced mallocs at load time 2014-05-21 13:02:02 -05:00
pancake
a1224b2156 Refactor rva > vaddr and offset > paddr.
That change may make mixing vaddr and paddr more visible
2014-05-21 03:18:00 +02:00
pancake
879f295365 Fix bin.rawstr (rabin2 -zz), some offsets wrong in PE 2014-05-19 02:41:53 +02:00
Anton Kochkov
c644050a59 Fix CID 1214309 2014-05-17 03:00:45 +04:00
Anton Kochkov
90ef2d220f Fix CID 1214330 2014-05-17 02:56:52 +04:00
Anton Kochkov
3b4f167473 Fix CID 1214310 2014-05-17 02:52:27 +04:00
Anton Kochkov
58b5e970ba Fix CID 1214328 2014-05-17 02:49:26 +04:00
Anton Kochkov
86d13f5340 Fix CID 1214329 2014-05-17 02:47:43 +04:00
pancake
c6a73d3074 Fix loading sections from fatmach0 bins 2014-05-16 03:48:57 +02:00
pancake
41692b70e6 Fix regression: PE baddr, update uncrustify 2014-05-16 02:46:07 +02:00
pancake
03e1407dd9 Expose current opened file in 'k bin/cur/..' 2014-05-14 18:02:56 +02:00
pancake
587c5f51c2 Implement MACH0- crypto and UUID inside Sdb bin/<fd>/info 2014-05-14 05:48:03 +02:00
Adam Pridgen
6d1da071fe Fixed empty flags issues with debugger 2014-05-13 21:54:18 -05:00
Adam Pridgen
5bb7ddef66 Added listing for binfiles, selection by binobject ids, selection by binfile ids, and deletion by bin object ids 2014-05-13 21:54:18 -05:00
deeso
1fbc7f2168 Added load_bytes, Pushed curplugin down to RBinObj, Reworking the RBinFIle loading to accomodate RBinObj reworked how all bins are loaded. Needed to hack IO to make
this work with rbinfiles and rbinobjects.

Conflicts:
	libr/bin/bin.c
	libr/bin/p/bin_te.c
2014-05-13 21:54:18 -05:00
pancake
216c183b6e Remove tons of useless 'if (x) free (x)' 2014-05-09 17:40:28 +02:00
jvoisin
f37a120422 Fix CID 1135066 2014-05-09 15:47:42 +02:00
deeso
4ad0f2a400 Tweaking bin plugins so that they can check bytes along with a binfile and fixed extraneous * in buf.c and r_util.h 2014-05-08 14:09:10 -05:00
Adam Pridgen
baf8ead86f Update bin info for binfile being set in the environment 2014-05-05 22:07:01 -05:00
Anton Kochkov
98f8fff3f7 Fix CID 1211152 2014-05-06 01:33:53 +04:00
Adam Pridgen
e9cabecc45 Fix CIDs: 1211131, 1211134, 1211136, 1211133, 1211143 2014-05-04 22:09:20 -05:00
Adam Pridgen
bd297f6788 reworked how bins environmnent variables are set (e.g. io.va, arch, bits, etc.) and fixed some more mach0 regressions 2014-05-04 17:15:55 -05:00
deeso
3d8dc61a55 Fixed some of the mach0 regressions 2014-05-03 09:58:53 -05:00
pancake
a0da04cb16 Fix r_bin.h (should fix bindings) and more MAKE_JOBS 2014-05-03 02:19:14 +02:00
fr33tux
3d801f90ff Remove r_list_destroy, replaced it by r_list_purge 2014-05-03 01:27:10 +02:00
deeso
d5a6c3d23c Adding r_bin_load_as feature and fixing null pointer reference in rabin. 2014-05-02 13:51:02 -05:00
deeso
3adcb54f17 Overhauled how files are loaded. Now *all* files use an IO plugin the default one is mmap'ed 2014-05-01 20:13:57 -05:00
Adam Pridgen
c3d6664756 Adding multi-bin support for files that contain multiple objects and lots of other fixes in libr/bin 2014-04-28 12:11:14 -05:00
deeso
5f6f8064d9 Fixed some issues in bin/dwarf.c and Fixed 1205194, 1205193, 1205192, 1205202, 1205203, 1205204, 1205205, 1205209, 1205208, 1205207, 1205206 2014-04-25 15:14:57 -05:00
deeso
d5908941fb Steps toward fixing the reopen of a file being debugged 2014-04-24 18:21:40 -05:00
deeso
c6a7faad77 fixed the bug with the insane fuzz command 2014-04-22 23:06:00 -05:00
pancake
61bc0c8268 Fix t/io/zerofile segfault 2014-04-23 04:04:50 +02:00
pancake
836803d786 Sdbize RBin.list_archs(). Expose addrinfo in 'k bin/fd.#/addrinfo/*' 2014-04-23 03:57:13 +02:00
Fedor Sakharov
6c5505b39d Use sdb to store dwarf lineaddr info 2014-04-21 19:22:37 +04:00
pancake
fd6196e1f1 Fix mach0 arch listing (!= fatmach0) 2014-04-21 13:16:22 +02:00
deeso
d1186ac7c2 Added a temporary fix for the bin->printf issue 2014-04-20 15:01:51 -05:00
deeso
be5c6b6f0d Fixed the parsing and extraction of RBinFiles in macho or other multi-files. There appears to be a problem with bin->printf 2014-04-19 16:38:37 -05:00
pancake
2b84217ce8 Fix few warns in RBin 2014-04-18 16:37:02 +02:00
pancake
61fba34835 Add 'iA' command to list all archs (sub-bins) 2014-04-18 12:10:38 +02:00
pancake
662de48bd2 Fix rabin2 -z on Rust binaries 2014-04-04 00:24:56 +02:00
pancake
613e6e2f9c Fix invalid free and r2 -hh help 2014-04-03 23:05:52 +02:00
Adam Pridgen
eaa8f303fc fixed issue with r_bin missing stuff 2014-04-03 14:13:02 -05:00
Adam Pridgen
3048a34783 Trying to fix mem-leaks, and allow updating of bin object infos 2014-04-03 14:04:07 -05:00
pancake
7c8daf1e70 Refactoring RBinMeta into RBinDbgInfo 2014-03-10 02:27:32 +01:00
pancake
9ec418ec37 Fix rap:// and enhace RConsMouseWheel support 2014-03-02 00:31:35 +01:00
pancake
f3d622a641 ReFix for #585 issue 2014-02-27 03:01:14 +01:00
pancake
5666b6ce2b Refix #652 2014-02-22 02:52:56 +01:00
pancake
7e5d6894fb Fix #652 - rabin2 -g/-x/-N segfault 2014-02-22 02:48:13 +01:00
pancake
cb7c2b7f56 Fix possible null deref in bin.get_info 2014-02-14 11:51:08 +01:00
pancake
693653068e Fix strings and main offsets in PE 2014-02-13 01:48:15 +01:00
pancake
1390d9f2d5 Add length and size fields in RBinString 2014-02-11 00:08:12 +01:00
pancake
e70d43fc4f Implement String Type field in RBin string search (like in r1) 2014-02-10 17:19:18 +01:00
Adam Pridgen
dc06501f4a clean up sloppy spacing 2014-02-02 23:55:03 -06:00
Adam Pridgen
d01e6ac04c Fixed the entrypoint issue, need to address XXX in r_core_bin_info 2014-02-02 23:50:06 -06:00
pancake
9565830426 Bypass (comment) valgrind issue 2014-01-12 02:21:38 +01:00
pancake
6e8073a67f Fix @b: command suffix for 'pd' and fix issue with malformed mach0 2014-01-29 02:42:22 +01:00
Adam Pridgen
d74e10e13b Fixed the many load so that when switching priority, offset is updated to the current bin. TODO: save offset when changing priority 2014-01-26 01:29:17 -06:00
Adam Pridgen
5eb3e68c4f fixed warning introduced by java 2014-01-22 21:29:07 -06:00
Adam Pridgen
51a27ab1cc Coverity Fixes 2014-01-22 16:58:23 -06:00
pancake
1878a8cbae Fix previously skipped segfault 2014-01-20 03:29:50 +01:00
Adam Pridgen
db1bb1a089 Changed the location of RBinObject, and created RBinFile to conform similarly to
RCoreFile, where RBinFile contains meta information for RBinObjects.  Now
RBinFiles are swapped out along with the RCoreFile when the priority is changed.
2014-01-20 02:44:25 +01:00
Adam Pridgen
415a77dca0 Java can now load multiple bins into radare space, and analyse the different bins.
See libr/bin/p.bin_java.c libr/anal/p/anal_java.c for the hacky details.
Fixed the coverity issue.
2014-01-12 17:36:47 -06:00
pancake
35d14529a4 Fix minstrlen issue with elf binaries and Cd -X 2013-12-29 03:42:18 +01:00
pancake
1185a8210b Integrate SDB into RBin accessible with the 'ik' command 2013-12-20 01:20:17 +01:00
Roi Martin (@nibble_ds)
3f5ebd9d16 Fix #458 - Negative baddr
Fix r_bin_get_vaddr() (needs further testing due to changes in r_io)
2013-12-19 19:43:44 +01:00
Adam Pridgen
ddf540d0ab Squashed merge of @deeso's pullreq for the Java RBin plugin
Added basic interpretation of java access flags for classes, fields, and methods
Added a visibility_str to RBinSymbol and RBinClass, and updated getters in Java
Added minstrlen to bin_java plugin struct
Fixed bin->minstrlen not being set in r_bin_init_items
Fixed iinc instruction.
2013-12-17 02:23:16 +01:00
pancake
bbe6e8c8a2 Add license to RBin, RDebug and RIO plugins 2013-12-10 04:19:04 +01:00
pancake
c165361124 Add bin.bf for brainfuck and use static ESIL struct 2013-12-10 03:35:59 +01:00
pancake
26807eec4d Fix #386 - Crash when rabin2/radare2 terminates 2013-12-10 02:20:51 +01:00
pancake
f76441b7e7 Fix some warnings 2013-12-09 04:56:13 +01:00
Adam Pridgen
38c9af46b0 Fix the bin.minstrlen bug by adding a callback and refereshing strings when this value changes 2013-12-05 23:51:17 -06:00
Adam Pridgen
1289476120 Cleaning up functionality and fix some bugs for Java 2013-12-06 05:42:35 +01:00
Adam Pridgen
b71bf37622 Fixed issue where strings were not loaded from bin_strings, because r->bin->minstrlen is zero (set from r_config) (fixed in set_items and r_bin_io_load) 2013-12-06 02:51:08 +01:00
Adam Pridgen
ec5a679ec8 Fixed IO plugin load again, would not properly load the plugin 2013-12-03 04:52:46 +01:00
Adam Pridgen
0ea6509f03 Fixed construction of r_bin_io_load s.t. buffers, and fixed JavaFields initialization in class.c 2013-12-02 04:11:05 +01:00
pancake
904751ce86 Fix some startup valgrind warnings 2013-11-25 00:45:18 +01:00
aaSSfxxx
ba3065fb99 Add get_vaddr to RBinPlugin and fix vaddr calculation for PE files 2013-11-20 12:16:45 +01:00
Adam Pridgen
532f420ffa Added fixes to load bins from IO Plugins and Fixed filename extraction so that IO Plugin names are respected instead of extracting then out of the URIs 2013-11-12 04:46:28 +01:00
pancake
69bb3b2c1f Fix #321 - rabin2 -zz should ignore sections 2013-11-09 00:28:58 +01:00
pancake
50fe2fdd1f Fix #315 - Changing bin.rawstr on runtime doesn't updates RBin info 2013-11-06 23:15:16 +01:00
pancake
7cb31941a6 Fix double free when loading malformed PE file
FMI: https://corkami.googlecode.com/svn/trunk/src/PE/lfanew_relocW7.asm
2013-07-03 11:57:37 +02:00
pancake
04cfefb9d8 Fixes on dyldcache list and x86 branch analysis
Fix some branch analysis issues for x86
Add new simpler r_reg api r_reg_getv()
Store library offset in dyldcache xtract info
Accessible via rabin2 -A or r2 <file>
Looks like dyldcache is too slow and buggy for latest caches
Fix indentation in branch comments
2013-06-20 02:49:39 +02:00
pancake
0d0bd22374 Fix rva offset when no scnrva in r_bin 2013-06-18 02:14:57 +02:00
pancake
7e5f1f5851 No ldconfig if /usr installs and fix segfault using RCore api 2013-06-17 11:41:00 +02:00
pancake
bc0104563b Initial support for runtime versioned libraries
- This check will ensure you are running the latest r2 version.
2013-06-14 02:51:33 +02:00
pancake
3f1d3ba146 Better r_str_hash(), Fixes in CCa, Added ?h, Better rbin for BEOS bins
Identify Haiku binaries as 'beos' with noodle()
Fix CCa for non numeric offsets
Use sdb's r_str_hash() instead of old one (much less collisions)
Added ?h command to hash strings
CCa now appends instead of replacing comments
Do not mark as static if bin links to libs
2013-06-07 10:26:37 +02:00
pancake
a5ab4aca9b Dynamic string range detection. Fix ELF strings when no sections 2013-05-23 03:47:57 +02:00
pancake
16ddff4eb9 More work on ESIL, and implement r2 -Desil .. 2013-05-20 03:00:49 +02:00
pancake
c22aaf16d2 Fix bindings, loading strings of unknown filetype 2013-04-26 00:04:05 +02:00
pancake
9e0d7b777b Fix corner case when loading huge files with strings 2013-04-24 13:09:06 +02:00
pancake
6806c11792 Better ARM analysis, Fix blockread in V[0-9] 2013-03-08 12:58:03 +01:00
pancake
97484a7b6c Add conditionals, 'dsi' to continua !, Fix bindings build
Added r_num_conditional function to stop the instruction set. I is accessible in vuu¡
2013-03-03 05:03:48 +01:00
pancake
133f2dc157 Better r2 -L output. Sync spaces with rasm2/rabin2 -L 2013-03-03 03:23:52 +01:00
pancake
4c244a818c Add 'Ch', handle c++ lang in rbin and obey cursor in V: 2013-03-01 09:57:30 +01:00
pancake
7fbe9071ce Add rasm2 -w to describe opcodes, fix massemble
Add rasm2 -w to get opcode description
Fix multiopcode/multiline comments parsing
Avoid multiple load when there are no sub-bins
Fix r_str_replace_char
2013-02-24 21:12:30 +01:00
pancake
263816f52d Minor fixes for ctypes bindings 2013-02-19 03:03:05 +01:00
pancake
53b7f83749 Fix rafind2 help, honor rasm2 -l and fix objc demangle
Fix overflow in objc method name demangling
2013-02-15 13:24:09 +01:00
pancake
766563cc6e Big endian for arm.winedbg and addn randomart in rax2 -k
r_asm: Add support for big endian arm.winedbg
rax2: Add -k randomart to rax2, -k is now -B
rax2: Handle multiple flags on a single argument
rax2: update manpage
2013-02-13 01:20:42 +01:00
pancake
f37df0d2c6 Fix fatmach0 extract when unknown files are inside
Fix segfault in java class header parser
Fix help message of 'wt' command
2013-01-29 19:39:41 +01:00
pancake
48f710abe8 Share RBinJavaObj to RAsmJava plugin, better java and fixes in config
Some more work to get java support back (analysis, disasm, bin share)
Honor ordinal field in java r_bin methods
Fix segfault in 'af*' on FreeBSD (thanks idwer for reporting!)
Fix some valgrind warnings
Better io.maxblk handling
Fix div by zero when blocksize is 0
Fix disasm lines when no function and extra code comments
2012-12-20 11:31:38 +01:00
pancake
58371d6e2f Add rabin2 -N flag to set minimum string length
By default is 2, but PE which is 4
Sort rabin2 -h flags alphabetically
Add r_bin plugin-specific minimum string length
New r_list_newf() constructor which replaces the hacky R_LIST_NEW macro
2012-12-09 01:39:27 +01:00
pancake
08e93418f5 Some better support for classes in rabin2 2012-11-07 10:41:12 +01:00
pancake
ea8dc25221 Initial objc support, visual 'i' with cursor and 'wow'
Some more fortunes
Initial support for Objective-C
New command 'wow' to fill block with cyclic hex value
Visual 'i' when cursor enabled uses 'wow'
2012-11-07 04:25:42 +01:00
pancake
9f92f9aece Fix many null pointer deref when passing trashed data
Added 'pa' command to print assembled instructions
2012-09-18 03:39:32 +02:00
pancake
e9829c5c9f Fix build 2012-08-26 11:07:09 +02:00
pancake
e46efa8a1d Initial implementation of r_bin_size (rabin2 -Z)
Changes in the disasm loop to support continuous fun
Fixes disasm after opcode payload
Added RConstr code in r_util (not yet used)
RBinSize implemented for elf, mach0 and plan9
Fix build
2012-08-23 12:46:55 +02:00
pancake
f75817ee6c Initial work on supporting payloaded opcodes
Basic classes support for dalvik (rabin2 -C, ic*)
2012-08-22 18:02:23 +02:00
pancake
e6e1490fe6 Add support for Java debug line information
Workaround Java CLASS parser bug
Still work-in-progress for full debug line support
$ rabin2 -dr foo.class
2012-08-14 18:22:24 +02:00
pancake
e365b90d5f Implement support for >- (pipe to editor)
Fix another race condition in the build system
Fix many null deref reported by clang-analyzer
Assume -w when running r2 with -d
2012-08-13 17:42:25 +02:00
Roi Martin (@nibble_ds)
15e44b2e58 Fix delta bug with fat mach-o 2012-08-08 12:54:23 +02:00
pancake
9cc62d85a0 Fix vapis 2012-08-07 14:12:14 +02:00
pancake
3fb3f58fcd Add missing dalvik opcode, rename invoke-direct-empty
rabin2 -h works even with other flags passed
random syntax fixups and use R_NEW0 where possible
initial dummy implementation of r_bin_size()
2012-08-07 10:28:03 +02:00
pancake
90b1936910 Fix make purge and uninitialized memory in RBin 2012-08-06 17:34:01 +02:00
pancake
9362041562 Huge RBin refactoring and fix mach0 section perms 2012-08-04 23:48:06 +02:00
pancake
c39d68ad3e Remove some outdated TODO/XXX comments
Add 'dbs' command to swap/toggle breakpoints
Bind debugger keys to key.fX visual bindings
Use --swig in r2-bindings. But still broken
2012-07-16 11:39:43 +02:00
pancake
7a4a3dbbfd Fix string parsing in rabin2 -z and more random fixes
- Random changes in libr/db/pair.. still buggy
 - remove debug printfs from calc.c
 - ?k command is now more usable. supports ``..` strings
 - fix segfault in r_cons (nullptr)
 - Add support for !! command to use r_cons
   > pd|!grep eax~ebx   # now this command works
2012-07-02 00:38:02 +02:00
pancake
3877483e88 * Fix possible use of uninitialized memory in r_num 2012-06-15 15:39:04 +02:00
pancake
810d9a3dbc * Put rax2 buf in .bss instead of the stack
* Add support for wide string dump in r_bin
* Fix detection of data section in PE
* Show error if temporary seek flag does not exists
* Fix wrong disassmbly with 'pd' (invalid)
2012-05-30 03:23:53 +02:00
pancake
c33a057d41 * Fix segfault in OpenBSD when opening empty files 2011-07-04 02:17:00 +02:00
pancake
f6e36687ed ** Apply Simon Ruderich patch with few modifications
* libr/bin/bin.c: Temporary solution to fix malloc://
* libr/bin/t/test_create.c: Add missing return
* libr/bin/t/test_create.c: Fix gcc warning
* libr/core/cmd.c: Fix read from uninitialized memory
* libr/io/io.c: Fix uninitialized variable
* libr/print/print.c: Prevent invalid read
* libr/util/buf.c: Don't return free()d memory in r_buf_mmap()
2012-02-04 23:25:10 +01:00
pancake
840550aa3a * Add asm.tabs for bearuty for free (enable by default?)
* Apply @l0gic patch for ELF parsing segfault
* Improve a lot the startup time by using r_file_mmap
* Fix build on osx
2012-01-26 03:18:45 +01:00
pancake
d02691b086 * Handle ^C in 'af' code analysis
* Fix parsing of ELF binaries generated by TCC
* Added iOS/arm register profile for the native debugger
* Swap endian of ptn date
2012-01-19 00:19:01 +01:00
earada
f05cc335b4 * Fix segfault in cmd_flag
* Fix 'rabin2 -A' with dummy plugin
2011-12-20 02:39:55 +01:00
pancake
997a6dbd14 * Apply patch from @w_levin fixing lot of memory leaks - Thanks! 2011-12-16 16:33:06 +01:00
pancake
d779162f07 * Apply @w_levin patch fixing memory leaks
- Use r_list in RBin (deprecate list.h) Thanks!
2011-12-13 14:00:22 +01:00
pancake
bc8f1e617b * Fix for .ko and .o elf parsing 2011-12-01 09:32:16 +01:00
pancake
6de942e05d * Add RBinInfo->has_va
- Used to autoforce io.va after loading the bin
  - Fixes loading kernel modules and object files
* Fix loading strings on a object file without io.va
* Add install-rev.sh script
2011-11-29 15:29:50 +01:00
pancake
d7f2c850be * Add initial native support for fat binaries in r2
- Select arch/bits with r2 -a and -b (old -b is now -B)
  - Kinda hacky, but works for osx-x86/32/64
  - Export offset information of fat bins
* Show flags in search output
* Disable interactive console in rabin2
* Do not comment int3 opcodes
2011-11-22 00:59:20 +01:00
pancake
85f5829be6 * Make oxfoo1m3 crackme load correctly
- Do not find strings in binaries with no data sections
  - Add program header section underlaying the rest of sections
* Do not newline when gotoxy'ng
  - visual mode is now smarter
* New ? commands
  - ?p = show physical address
  - ?S = show section name for given address
* Initial refactoring in r_io to make section overlaps happy
  - Those changes are experimental and can lead to problems
  - Do not iterate prev
  - Do not sort by offset
2011-10-25 20:30:05 +02:00
pancake
098b1ba127 * Implement input and output filters for rasm2
- Experimental.. not yet ready for release
  - Add rasm2 -F flag to specify input and output filters
   $ rasm2 -F att2intel
* Add new att2intel r_parse plugin
  - make mrproper required
* Initial implementation of RBinClass
  - Only experimental and Java-specific atm
  - Add rabin2 -C to display classes
* Optimize some r_str functions
2011-10-05 02:38:37 +02:00
Nibble
4a233f58a2 * Add missing comment to bin.c 2011-09-04 02:23:53 +02:00
Nibble
334a6bcfb8 * Fix list and select archs in rabin2 (flags -A and -a)
* Fix memory leak in rabin2
* Fix segfault in r_bin_use_arch()
2011-09-04 02:19:43 +02:00
Nibble
ffa32be19e * Add r_bin_plugin "any"
- Used for unknown formats, firmwares, etc.
* Add "bin.any" to plugins.def.cfg
2011-09-02 16:45:39 +02:00
pancake
0ae2050448 * Fix segfault in r_bin/pe -- thanks l0gic
- sections are not properly read in cdak binaries
2011-09-02 03:09:26 +02:00
pancake
6d5bef5976 * Use hg manifest in make dist
* Honor r_bin_use_arch arch and bits information for r_bin_create
* Implemented sC command to seek by comment matching
* Fix one byte Color_RESET in r_print
* Minor refactor in rasm newlisp example
2011-08-27 03:31:55 +02:00
pancake
041751e029 * Added osxtest.r and adapt rarc2-tool to support rasm2 and rabin2 -c
- rarc2-tool can now create tiny executables!
* Fix segmentation fault in bad use of r_bin_create api
2011-07-26 00:30:45 +02:00
pancake
8d06dd2f02 * Initial implementation of rabin2 -c
- Allow to create tiny binaries with r_bin
  - ATM only MACH0 format for x86-32 is supported
  $ ./rabin2 -a x86_32 -c mach0:31c040682a00000081ec04000000cd80 a.out
* Rename r_bin_set_arch{idx} to r_bin_select{idx}
  - New API r_bin_create and r_bin_use_arch()
2011-07-25 21:10:25 +02:00
pancake
868acc4059 * Added RBinBind type and logic
- Refactoring required to allow RAsm retrieve info from RBin
  - Will be used by dalvik and java disassemblers
2011-06-26 20:29:24 +02:00
pancake
46c7851ffc * Some fixes in the LEA/MOV memref analysis
* Stretch bytes and stackptr in disasm
* Fix string length in r_bin (\0 is counted)
  - hello is a 6 byte length string
* Fix 'Vds' to autodetect string length
2011-06-09 02:12:46 +02:00
pancake
c9faf9f88b * Do not load strings if project is already loaded
- Added bin.strings eval key
* Fix range check for anal/meta
* Do not exit(1) when write error on console
* Added 'ad' command to analyze data
  - Find trampolines from data to text f.ex
  - Supports 32 and 64 bit archs
* flags/name moved to util/name

--HG--
rename : libr/flags/name.c => libr/util/name.c
2011-06-04 05:27:26 +02:00
pancake
e557d9a385 * Drop 'r_cons.h' from r_fs
* Fix visual glitch in Vej and Vt
* Handle demangled names as comments
  - in rabin2 and core->bin_load
  - Needs to be a RAnalCall at some point
  - bin_java calls the dummy r_bin_demangle_java
  - Add R_BIN_NM_ANY enum
* Add asm.lbytes config to align disasm bytes to left
* Fix visual glitch in function boundaries
* Import upgraded versions of the idc2rdb scripts in doc/
2011-02-25 04:19:30 +01:00
Nibble
af604bed6b * Remove remaining r_vm references
* Minor changes in r_bin simplification
2011-02-24 10:07:29 +01:00
pancake
9efa5a50cb * Fix cmd.vprompt
* Simplify some functions in r_bin
* Added support for x86-64 for the 'ap' command
* Added dummy function calls for r_bin_demangle()
2011-02-23 20:53:56 +01:00
pancake
5e2fd3197e * Added dummy r_bin_demangle 2010-12-03 14:53:06 +01:00
pancake
421208a0c7 * Replace main for binsym in r_bin
* Added dummy commands for r_debug_fork/clone
2010-11-18 11:41:17 +01:00
Nibble
7fe2f823e7 * Fix build for win
* Fix string rva in r_bin
2010-10-17 20:38:19 +02:00
pancake
e8f8e72896 * Added r_bin_get_object() to cache binary information
* Initial work in r_core_bin_load()
  - Integrating rabin2 inside core
2010-10-04 10:55:43 +02:00
Nibble
afedad76bb * Fix memory leak in bin_mach0 2010-10-04 04:20:19 +02:00
Nibble
cec1f3fa73 * r_bin
- Refactor r_bin to work better with big fatbins
  - Don't load all sub-bins in memory
    Only load the fatbin and the selected sub-bin
  - Add r_bin_set_archidx() and r_bin_list_archs()
  - Update t/{rpathdel.c, test_meta.c}
* rabin2
  - Use '-f str' to select sub-bin by name
2010-10-04 03:46:58 +02:00
Nibble
48dd408e45 * Merge
* Minor fixes in r_bin
2010-10-01 11:58:11 +02:00
pancake
8081f02601 * Fix uninitialized variable in rabin2
* Fix null pointer handling in rbin when no xtr plugin found
* Initial draft code for the x86 debug registers implementation
* Fix avr* command
2010-10-01 11:10:59 +02:00
Nibble
41bd2fd0ea * rabin2
- Show filesize in '-x' output
  - Select "sub-bin" using '-a arch_bits' and '-n filename'
* r_bin
  - Add argument "name" to r_bin_set_arch
2010-10-01 10:09:50 +02:00
Nibble
987d8599f9 * Initial implementation of the RBin extractor for dyld cache
* Add bin_xtr_dyldcache to plugins.def.cfg
* Show bin name in the output of 'rabin2 -A'
* Minor fix in rabin_list_archs() in rabin2
2010-10-01 04:26:52 +02:00
Nibble
793dae395d * Massive refactoring of r_bin
- Add support for fatbins (currently only fatmach0)
  - Minimize creation of r_buffers
* rabin2
  - Add flag -A for listing archs
  - Add flags -a and -B for selecting arch
  - In the next commit -A and -B will be removed and -a will work
    with the following format:
    [-a arch bits] for selecting arch
	[-a] for listing them

--HG--
rename : libr/bin/p/bin_fatmach0.c => libr/bin/p/bin_xtr_fatmach0.c
2010-09-24 21:23:13 +02:00
Nibble
5733497a0b * Add bindings for go
* Add swig/go/test-r_bin.go for testing r_bin from go
* Fix build for r_bp and r_search bindings
* Rename enum VarType to VarClass in r_anal.vapi to avoid conflicts
* Add flag -R to rabin_cmd in r2 start up
2010-09-12 12:31:18 +02:00
Nibble
5567da9538 * Add support for parsing relocs to r_bin
* Add flag -R to rabin2 to list relocs
* Implement reloc resolution in r_bin_elf for 32 & 64 bits
2010-09-10 11:11:38 +02:00
Nibble
a7a4a674f0 * Fix segfault parsing mach-o 2010-09-07 21:38:54 +02:00
pancake
3287f8d64d * Filter string to avoid escaped commands execution (r_str_unscape)
* More chars filtered in rabin2 -z (flag ..)
* Parse PLT in order to find matching ordinal in rgot.vala
2010-08-16 14:58:10 +02:00
pancake
c101235102 * Analyze 'svc' opcode in ARM as software interrupt
- Interrupt number is stored in aop->value
  - Add dummy syscall table for osx/arm
  - Fix identification of syscall table on iOS bins
* Fix rabin2 -z on MACH0 binaries
2010-08-09 23:38:32 +02:00
Nibble
bb8cfd866d * r_bin
- Add function r_bin_extract()
  - Add lib r_bin_fatmach0 into format/mach0/
  - Complete mach0_specs with fat mach-o stuff
  - Add plugin bin_fatmach0
  - Initial import of mach-ex into r_bin
  - Remove mach-ex
* rabin2
  - Add flag -x for extracting bins from file
* Build
  - Update plugins.def.cfg
  - Remove mach-ex stuff from libr/Makefile
2010-07-29 16:04:18 +02:00
pancake
37c3e25664 * RCore now depends on RThread
- Loads rabin2 information in a background thread
  - Prompt is now much more responsive
  - Fix segfault in null pointered var in RThread
* rabin2 load strings only from data sections if found
* Split r_core_prompt/exec (make it cooperative-thread-friendly)
2010-06-23 17:30:16 +02:00
pancake
ace71e8be4 * Load string flags into r2
- Fix string filtering
* Display string references for ARM (load indirections)
* Fix numeric indexing of branch references in visual mode
* Display '>' char for call instructions
* More work on RMeta
  - unscape strings to avoid \n and \t
  - handle correctly the 'Cs' command
  - Add partial documentation for the rest of 'C' commands
2010-06-21 00:48:06 +02:00
Nibble
2f43431e80 * r_bin
- Add r_bin_get_main
  - Implement get_main for elf32 & elf64
  - Rename RBinEntry to RBinAddr
* rabin2
  - Add flag -M to output main offset and va
* bindings
  - Update r_bin.vapi
  - Minor fixup in r_util.vapi
2010-05-30 06:06:25 +02:00
Nibble
4235dd2a8e * Fix bug with static plugins
* Treat r_cons and r_line as singleton in r_core_init
* Move gdiff to r_core
* Fix libgmp support

--HG--
rename : libr/diff/gdiff.c => libr/core/gdiff.c
rename : libr/diff/gdiff.h => libr/core/gdiff.h
2010-05-28 02:44:51 +02:00
Nibble
083ebe4832 * r_core
- Fix segfault in r_core
* r_bin
  - Minor fixup in r_bin_load
  - Move plugin pointers to r_bin.h
2010-05-27 19:58:54 +02:00
Nibble
5c35f6e359 * Rename {r_*_handle_t, R*Handle} to {r_*_plugin_t, R*Plugin} 2010-05-26 01:42:22 +02:00
pancake
c8d637a26a * RAsmHandle -> RAsmHandler.. Same for RBin
- Define RAsmHandler in r_asm vapi
* Random code cleanup
* Define RHex.str2bin in rutil vapi
2010-05-26 00:59:10 +02:00
Nibble
7abcfe6852 * Refactoring
- Remove all init functions (included in _new)
  - Update vapi's (needs more work)
2010-05-20 17:40:58 +02:00
pancake
4137587cb3 * Fix compilation under mingw32
- Linking fixed for r_sign and
* Fix some reads out-of-bounds in r_bin_elf
  - Use __strnlen instead of ELF_STRING_LENGTH
  - Some simplifications using macros
* Open plugins in radare2 found in '.' by default
  - Make w32 happy
  - Fix RLib for w32 and local plugin files
* Implement r_sys_cmd_str() for w32
  - Also r_sys_setenv()
* Fix printfs in lib/t example
* win7 syscall list is now default windows one
* Added 'r_sys_perror' to make it portable on *nix and w32
* Rename RLibrary into RLib
2010-04-12 02:22:52 +02:00
Nibble
c5396fbb10 * Fix cmd repitition (3x@offset)
* Fix seek to invalid offsets
* Improve r_anal graphs
2010-04-08 14:04:34 +02:00
Nibble
ed94bdcb14 * r_bin
- Add helpers for info->dbg_info
* vapis
  - Add r_hex_* stuff to r_util.vapi under RHex
  - Update r_bin.vapi
* bindings
  - Add target "install-lua" to Makefile
2010-03-13 20:25:03 +01:00