Commit Graph

138 Commits

Author SHA1 Message Date
pancake
69a12884ed Simplify the build system
doc.sw has been moved to radare2-extras
2012-10-03 14:31:35 +02:00
pancake
7b627d24a2 Fix mingw32 build 2012-09-01 01:06:24 +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
ef8f41eafb Initial integartion of r_bin_dwarf into RCore 2012-08-14 02:37:42 +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
9362041562 Huge RBin refactoring and fix mach0 section perms 2012-08-04 23:48:06 +02:00
pancake
c814a9f67a Initial implementation of dwarf debug_line parser
rabin2 -d a.out
2012-07-12 02:47:04 +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
fdb25ffa03 * initial import of dummy dwarf support
* handle eval cuando escribes una y otra vez
* add support for [bracket] comma-separated list for controversial
  - add api to push-back states
* Added uleb128 api in r_util
2012-06-28 01:27:40 +02:00
pancake
bc572ce3df * QNX/arm port (this is bb10 and playbook devices)
- no debugger support yet
2012-06-01 14:50:24 +02:00
pancake
fee1dfda07 * Fix some bugs reported by clang-analyzer 2012-05-31 02:41:45 +02:00
pancake
bdc810af35 * Fix rabin2 -O without filename output 2012-05-30 03:32:20 +02: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
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
1cc5b8e077 * Honor -o in rabin2 for dump section operation
* Autodetect and honor CC environment in ragg2 command
* Update ragg2 manpage
* Fix udis86 at&t '$' usage.. thanks @hteso for reporting!
2011-11-30 20:59:58 +01:00
earada
d0f81b8490 * Fix rabin2 -B baddr 2011-11-24 02:48:36 +01:00
earada
62c650b2a0 * Add graph.font=Courier eval var
* Use R_TRUE/R_FALSE instead of R_CORE_BIN_RADARE/R_CORE_BIN_PRINT
* Add notepad as windows editor by default
* Add 'T' menu at visual mode to show comments and anal info
2011-11-23 02:29:09 +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
earada
99919408e3 * Fix clean build 2011-11-12 22:36:42 +01:00
earada
ad006c9300 * Fix build
* Move libs and classes to r_core_bin_info
2011-11-12 17:15:05 +01:00
pancake
75290251da * Add initial support for plan9 binaries
- supports x86, arm, ppc, sparc, mips
* Use r_cons in r_core_bin
* Fix link of rabin2
  - Use r_cons_flush()
  - Refix ehdr issue
* r_io_size() now ignores va
* Add R_SYS_BASE
* Move r_anal_get_fcn_get into fcn.c
* Some more fixes
2011-11-12 04:51:45 +01:00
earada
4874de4569 * Refactorize rabin2 functionalities into r_core_bin_info
- r_core_bin_info shows bin data from core
- rabin2, file_load and cmd_info now uses this new api
2011-11-12 04:20:22 +01:00
earada
2fadc048e7 * RBin suport new section_end flags
* Add some filesystem automount support
2011-11-11 17:56:21 +01:00
pancake
95322945ab * Fix bug when redefining io sections
- Triggered by swapping io.va
  - Reported by @hteso
2011-11-03 23:34:18 +01:00
pancake
14f85bd76f * Import Glyn Kennington's patch for the build system
- Use absolute paths everywhere and simplify Makefiles
2011-11-03 11:49:50 +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
1f7f9dc036 * Enhacements for rarun2
- add 'timeout' directive
  - directives can now be passed in arguments
  - support more than 3 args for launching
  - show default config file in help
* Added test suite for r_egg
  - Fix nested conditional and loops
  - Some situations can result in broken code
  - Code needs a huge cleanup
* Varioues fixes for x86.nz plugin to make r_egg happy
* Install python plugins into dist-packages only
  - site-packages is not the right place
* Add R2_LIBDIR and R2_PREFIX constants
* Honor LIBDIR in sdbpath for r_syscall
* Fix rabin2 -h for -C
2011-10-24 04:35:42 +02:00
pancake
32afad2b65 * Fix build with clang
* Fix some warnings which result in more bugfixes. yay
2011-10-10 01:48:08 +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
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
pancake
4d6c585672 * Add support for mach0-arm and mach0-x86_64 in r_bin_create
- x86_64 has been tested and works fine, but needs some love
  - the arm mach0 (iPhone) is not yet tested, but the bin looks ok
* Install syscall sdb files into versioned directory in lib/radare2
2011-09-09 01:09:36 +02:00
pancake
62cd212ba1 * Fix non-PIC/static build (apply Glyn patches)
* Fix entropy multiplication bug (Thanks Glyn!)
* btw.. previous patch added asm.case eval var
2011-09-08 15:47:05 +02:00
pancake
4af07f8f2f * Fix linkage of rabin2 in OpenBSD 2011-09-06 17:12:45 +02:00
Nibble
0f8cc36a58 * Fix build
- Add r_db to DEPS in Makefiles
2011-09-04 11:49:32 +02:00
pancake
2c92c7d172 * Merge rapatch2 into rabin2 -p
* Honor bits in r_syscall_setup
  - Initial work on RPair in r_syscall
  - Not yet integrated, but design is mostly done
* Add r_str_split()
* Add python2 and python3 makefile rules in r2-bindings
2011-09-04 03:56:35 +02:00
Nibble
d7afa73011 * Minor refactoring of rabin2 main() 2011-09-04 02:44: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
8ec73271c7 * Filter section names in rabin2 output 2011-09-02 13:55:59 +02:00
pancake
429a475ac0 * Deprecate rarc2 and rarc2-tool
- Replaced by ragg2 - the new r_egg based tool for r2
* Add r_egg_assemble as a 2nd step for compilation
* Fix memory leak in r_egg_free
* Add support for 'cmp' and more 'test' variants for x86.nz
  - Ignore 'dword ptr' string
  - More test cases
* Fix SCSIZE issue in rasc2 -s

--HG--
rename : binr/rarc2/Makefile => binr/old.rarc2/Makefile
rename : binr/rarc2/README => binr/old.rarc2/README
rename : binr/rarc2/config.def.h => binr/old.rarc2/config.def.h
rename : binr/rarc2/config.h => binr/old.rarc2/config.h
rename : binr/rarc2/emit_arm.c => binr/old.rarc2/emit_arm.c
rename : binr/rarc2/emit_x64.c => binr/old.rarc2/emit_x64.c
rename : binr/rarc2/emit_x86.c => binr/old.rarc2/emit_x86.c
rename : binr/rarc2/i/libc.r => binr/old.rarc2/i/libc.r
rename : binr/rarc2/i/socket.r => binr/old.rarc2/i/socket.r
rename : binr/rarc2/osxtest.r => binr/old.rarc2/osxtest.r
rename : binr/rarc2/out.c => binr/old.rarc2/out.c
rename : binr/rarc2/rarc2-tool => binr/old.rarc2/rarc2-tool
rename : binr/rarc2/rarc2.c => binr/old.rarc2/rarc2.c
rename : binr/rarc2/rarc2.h => binr/old.rarc2/rarc2.h
rename : binr/rarc2/t/Makefile => binr/old.rarc2/t/Makefile
rename : binr/rarc2/t/argv.r => binr/old.rarc2/t/argv.r
rename : binr/rarc2/t/bytedump.r => binr/old.rarc2/t/bytedump.r
rename : binr/rarc2/t/data.r => binr/old.rarc2/t/data.r
rename : binr/rarc2/t/dump.r => binr/old.rarc2/t/dump.r
rename : binr/rarc2/t/hello.r => binr/old.rarc2/t/hello.r
rename : binr/rarc2/t/hi.r => binr/old.rarc2/t/hi.r
rename : binr/rarc2/t/if.r => binr/old.rarc2/t/if.r
rename : binr/rarc2/t/inline.r => binr/old.rarc2/t/inline.r
rename : binr/rarc2/t/input.r => binr/old.rarc2/t/input.r
rename : binr/rarc2/t/loop.r => binr/old.rarc2/t/loop.r
rename : binr/rarc2/t/ptr.r => binr/old.rarc2/t/ptr.r
rename : binr/rarc2/t/rawsys.r => binr/old.rarc2/t/rawsys.r
rename : binr/rarc2/t/rawsys64.r => binr/old.rarc2/t/rawsys64.r
rename : binr/rarc2/t/regs.r => binr/old.rarc2/t/regs.r
rename : binr/rarc2/t/ret.r => binr/old.rarc2/t/ret.r
rename : binr/rarc2/t/room.r => binr/old.rarc2/t/room.r
rename : binr/rarc2/t/segfault.r => binr/old.rarc2/t/segfault.r
rename : binr/rarc2/t/shell.r => binr/old.rarc2/t/shell.r
rename : binr/rarc2/t/sub.r => binr/old.rarc2/t/sub.r
rename : binr/rarc2/t/syscall.r => binr/old.rarc2/t/syscall.r
rename : binr/rarc2/test.r => binr/old.rarc2/test.r
rename : libr/egg/t/syscall.r => binr/ragg2/syscall.r
2011-08-08 02:07:26 +02:00
pancake
d2cf5e4425 * Import chmod() from sbase as r_file_chmod()
- Support recursive chmod
  - Handles string-based octal/expression formats
  - Used by rabin2 -c to chmod +x the created binary
2011-07-25 23:42:39 +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
fde9168bd4 * Remove linking dependencies in radiff2 as reported by Debian
* Use -v instead of -V in rasm2 too
2011-07-25 12:22:55 +02:00
pancake
28e5244064 * rax2 -s (without arg) uses stdin now
* Show help when no file given to rabin2 -O help
* Fix ELF strtab section read issue (workaround?)
2011-07-18 00:07:45 +02:00
pancake
814d220ac6 * Implement 'Cl' command to set sourceline comments
* Fix, implement and install rsc2
  - Added rsc2 srcline script
2011-05-25 15:43:54 +02:00
pancake
fb0119c9b5 * Fix build. Use r_name_filter in rabin2 2011-06-05 23:30:19 +02:00
pancake
bf95651e69 * Fix DEX parsing segfault
* Fix possible segfault on newer glibc
* Fix some indentations and Visual hints
2011-05-24 15:25:52 +02:00
pancake
09577a9246 * Initial import of the r_bin_fs plugin
- Autodetects underlying filesystem
  - Auomatically mounts a /root partition
  - Only support for 'HFS+' filesystem (as a test)
* Added 'oo' command to reopen current file
  - In debugger mode re-forks the process
2011-05-12 09:52:40 +02:00
pancake
daff6aff5d * Fix set_reg_profile callback in r_anal_arm
* Fix dupness issue between RDebug and RAnal sharing RReg
  - Move reg_profile string into inner RReg
* Remove vm.arch setup in rasm2 -ri
2011-03-24 00:54:09 +01:00
Nibble
1535b4c5c1 * Don't flag imports/symbols twice (also for functions)
* Remove unnecessary calls to r_flag_space_set()
* Show calls nicer in decode mode
2011-02-28 17:27:08 +01:00
pancake
d953cd9adf * Initial implementation of the java name mangling
- Added as comments before the method names
* Some fixes in r_bin_java
* Added r_buf(append/prepend)
* Show flags always in new lines
2011-02-27 20:30:41 +01: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
ead4e9502f * Simplify type assignment in r_anal
* Include fcn type in 'rabin2 -r' output
2011-02-08 00:15:12 +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
pancake
aacce16095 * Another fix for nonpic build 2010-11-10 04:00:49 +01:00
pancake
a6629c610c * Fix static compilation on Linux systems
- Not really portable, needs some work to fix w32 build
2010-11-10 03:55:27 +01:00
Nibble
c79afe3568 * Add var vm.arch
* Fix vm arch setup at startup
* Fix flag set in visual mode when cursor is enabled
* Filter string names before adding flags in r_bin_load
* Fix r_flag_name_filter (do trim)
* Fix r_sys_rmkdir
* Update TODO
2010-10-23 14:27:13 +02:00
pancake
f9e6ca28cf * Fixes in swig/ for OS type selection
* Move rsc2 into binr/

--HG--
rename : rsc2/rsc2.c => binr/rsc2/rsc2.c
rename : rsc2/scripts/intel2att => binr/rsc2/scripts/intel2att
2010-10-18 20:47:13 +02:00
Nibble
bfbd12ed3c * Don't add symbols as functions before analyze them
* Update and simplify gdiff
2010-10-13 18:51:10 +02:00
Nibble
836c91c32a * r_util
- Fix r_sys_rmkdir
* rabin2
  - Generate folder structure on extract operations
2010-10-04 13:57:48 +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
a1d0887ca8 * Fix build (update core/anal.c with the last changes in r_bin)
* Implement extract in rabin2
2010-10-04 04:01:25 +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
pancake
ee39ba239a * Add 'FS' #define for w32 and *nix
* Add support for thumb mode ARM disassembler
  - Workaround a warning in r_vm for arm-16
* More work on drx.c, but still not integrated
2010-10-04 00:42:11 +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
4b558bec3b * rabin2 -x uses filename.arch_bits as output file
* store full path in dyld cache filenames
2010-10-01 08:12:43 +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
eb811bbf08 * r_core
- Deprecate ah and add anal.plugin
  - e anal.plugin=? list available plugins
  - Add the command 'ar' to handle refs/xrefs
  - Remove old CX and Cx stuff
  - Remove afg (done by af)
* r_anal (& r_meta)
  - Remove refs/xrefs stuff from r_meta
  - Handle refs from r_anal
  - Add r_anal_ref_{add, del}
* rabin2
  - Add 'e anal.plugin' to the output of rabin2 -Ir
2010-09-28 13:58:03 +02:00
Nibble
0a09b20cc0 * rabin2
- Make -A output more verbose
  - Dump all archs with -x when no one is specified using -a
* cleanup TODO
2010-09-25 12:33:30 +02:00
Nibble
333fbbf55b * rabin2
- Set arch with 'rabin2 -a arch_bits filename'
  - Remove flag -B
  - Implement extract (-x)
2010-09-25 03:45:03 +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
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
283c2efef9 * rabin2
- Add flag -n to filter by {symbol, import, section} name
* r_core
  - dmi accepts argument symname
  - more work on cmd parsing
2010-08-17 13:15:18 +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
Nibble
6727897e73 * rabin2
- Add flag -b to set a custom baddr
* r_core
  - Add command 'dmi' to flag the symbols of a given lib in memory
2010-08-16 14:35:15 +02:00
Nibble
28ef002c21 * Fill field 'ordinal' in elf symbols 2010-08-16 01:14:54 +02:00
pancake
b7dbae4ebb * Display '*' in S= where you are
* Add note about the bug in io.va/-d/rabin2-r{v}S
* Fix rarc2/t
2010-08-15 21:30:59 +02:00
Nibble
d094f42d2f * r_bin
- Fill RBinImport->size within bin plugins
  - Add field size to RBinImport
* r_bin_elf
  - Correct value of r_bin_elf_symbol_t->size for imports
* rabin2
  - Output af+ command in radare mode
* Update TODO
2010-08-01 11:02:55 +02:00
Nibble
62e24bd0c6 * r_bin_fatmach0
- Huge refactoring of r_bin_fatmach0
* rabin2
  - Don't print msg "n bins extracted" in radare mode
2010-07-29 18:15:02 +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
2f09509630 * Fail when binr build fails somewhere
* userconf R2_VERSION
* Implement some more # hashing algorithms
2010-07-15 13:34:53 +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
3eb855f6c4 * r_bin
- Rename characteristics into srwx
  - Fix ref to binmain in the pe64 plugin
* r_bin_pe
  - Rename section.characteristics into section.flags like in
    the other formats
2010-06-17 18:45:27 +02:00
pancake
16089bb6e9 * Fix build of binr/
- Some missing deps everywhere
* Initial work for RAnalCond
2010-06-15 00:46:18 +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
pancake
49f09cc421 * Initial refactor to build libr bins (binr) out of libr
- Cleaner build/install
2010-05-28 17:15:20 +02:00