Commit Graph

49 Commits

Author SHA1 Message Date
pancake 589ee83f49 Fix ragg2 -v 2015-05-14 15:06:39 +02:00
pancake 45c5cd6b7a Fix ragg2 -w issue 2015-05-13 23:20:56 +02:00
pancake 14c6e46bfc Fix #2569 - alphabetically sort ragg2 -h 2015-05-13 23:07:30 +02:00
Quentin Santos 4f4346d889 Minor: more comments in ragg2.c 2015-05-13 22:55:52 +02:00
Quentin Santos cfc499b227 Edit ragg2 result regardless of the type of output 2015-05-13 22:55:52 +02:00
pancake 69b40d1afa Add ragg2 -n and -N and fix some bugs in r_buf and r_egg 2014-10-29 02:44:21 +01:00
pancake 5c2177f8b3 Add ragg2 -z to output in C string syntax 2014-10-20 02:14:19 +02:00
pancake c2f54e700c ragg2 use system default asm.bits 2014-10-18 04:05:54 +02:00
pancake 4c4173769b Revert "Fixing the issue where file size exceeds size of an integer":
3adb00621b
e2afa84443
0761955fdb
17cc18fad0
135c62fb5d
2014-09-20 15:33:59 +02:00
Adam Pridgen 135c62fb5d Fixing *most* warnings related to the change in r_file_slurp 2014-09-17 22:37:54 -05:00
pancake 30acdbf50c Refactor debruijn code and make it accessible from ragg2 -P 2014-09-05 16:03:40 +02:00
pancake a4389ce4ae Use r_num_math in ragg2 -d,-D 2014-06-01 05:38:36 +02:00
pancake d6c2866ab6 Handle multiple -B in ragg2 2014-05-31 14:22:39 +02:00
Anton Kochkov a6aecca2c7 Fix CID #1134976 2014-04-24 01:38:17 +04:00
pancake ae20ea8132 Add ragg2-cc support for OSX-x86-64 2014-03-28 16:22:34 +01:00
cquaid afa7c2bf99 Enable elf64 output in ragg2 2013-12-05 14:38:54 -06:00
pancake a249adb519 Fix #358 - ragg2 now can create binaries from .asm/.s files 2013-11-14 03:32:12 +01:00
pancake 1b2ba18c0e Fix #270 - ragg2 crashs on false-conditions loops 2013-11-10 04:33:12 +01:00
pancake d900345a66 Fix #266 - [ragg2] exit on invalid input (again) 2013-10-28 02:05:18 +01:00
pancake d025bd66f3 Fix #287 - ragg2 segfaults on uneven number of accolades 2013-10-24 00:51:26 +02:00
Eduardo de la Arada 7af16bdd34 Fix Issue #257 2013-10-14 16:15:55 +02:00
pancake dece987ca3 Fix various bugs on 64bits (mach0 entry, assembler, ragg) 2013-09-14 02:42:02 +02:00
pancake f6a8d7b3b8 Initial import of binr/r2agent 2013-05-11 01:58:05 +02:00
pancake 735a4f7a4a Fix -h and manpages. Kill rsc2 and rasc2 from binr/ 2013-04-02 12:11:20 +02:00
pancake 850045c329 Fix many bugs noticed during the training course
Fixed ragg2 -e segfault
Fix use of ragg2 -p
Fix memleaks and null derefs in rio and rsocket
Fix some build warnings
Fix the segfaults found in the ELF parser
Dwarf parsing is only done if bin.dwarf is true
2012-09-22 20:32:19 +02:00
pancake 526a8a66fe Fix function renaming and add some 8bit x86 ops
- 'afl' is now just listing functions
- Use 'afl*' to get also 'loc.' functions (BBs)
- Fix length in cb_hit for search
- Fix infinite build in libr/egg
- Fix 'afr' command to rename function
- Implement 8bit mov, (out,in)sb in x86.nz
- Fix ragg2 -d for one byte writes
- Fix vapi
2012-08-02 02:44:46 +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 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 8edef15e88 * Initial working import of the r_egg_xor encoder
- Fix r_egg and ragg2 accordingly
  - Based on @santitox patch. Thanks! :D
2011-12-01 03:28:12 +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
pancake ec7f601e2c * Add -d -D and -w flags to ragg2
- patch dword/qword and hexpair bytes on finalize
* Initial import of the dummy Shoorisu Yagana shellcode encoder
  - just a wishlist.. do not expect it for this release
2011-11-30 10:27:01 +01:00
pancake 35d535095b * Install includes in windows dist
* Import linux-x86-32/64 and darwin-x86-32 sflib includedirs
* Simplify data installation for magic, egg, syscall and asm
* Set R2_INCDIR in r_userconf
* Make ragg2-cc much smarter
  - use ragg2 -v to get paths and version
  - accept new flags -a -b -k for arch, bits and kernel
  - supports crosscompilation

--HG--
rename : libr/magic/d/OpenBSD => libr/magic/d/default/OpenBSD
rename : libr/magic/d/archive => libr/magic/d/default/archive
rename : libr/magic/d/cafebabe => libr/magic/d/default/cafebabe
rename : libr/magic/d/cisco => libr/magic/d/default/cisco
rename : libr/magic/d/database => libr/magic/d/default/database
rename : libr/magic/d/editors => libr/magic/d/default/editors
rename : libr/magic/d/elf => libr/magic/d/default/elf
rename : libr/magic/d/filesystems => libr/magic/d/default/filesystems
rename : libr/magic/d/flash => libr/magic/d/default/flash
rename : libr/magic/d/freebsd => libr/magic/d/default/freebsd
rename : libr/magic/d/gimp => libr/magic/d/default/gimp
rename : libr/magic/d/images => libr/magic/d/default/images
rename : libr/magic/d/java => libr/magic/d/default/java
rename : libr/magic/d/jpeg => libr/magic/d/default/jpeg
rename : libr/magic/d/linux => libr/magic/d/default/linux
rename : libr/magic/d/mail.news => libr/magic/d/default/mail.news
rename : libr/magic/d/matroska => libr/magic/d/default/matroska
rename : libr/magic/d/mime => libr/magic/d/default/mime
rename : libr/magic/d/msdos => libr/magic/d/default/msdos
rename : libr/magic/d/netbsd => libr/magic/d/default/netbsd
rename : libr/magic/d/pdf => libr/magic/d/default/pdf
rename : libr/magic/d/perl => libr/magic/d/default/perl
rename : libr/magic/d/python => libr/magic/d/default/python
rename : libr/magic/d/riff => libr/magic/d/default/riff
rename : libr/magic/d/sniffer => libr/magic/d/default/sniffer
rename : libr/magic/d/sql => libr/magic/d/default/sql
rename : libr/magic/d/sun => libr/magic/d/default/sun
rename : libr/magic/d/uuencode => libr/magic/d/default/uuencode
2011-11-29 03:14:27 +01:00
pancake f1bee51c94 * Add ragg2 -C 2011-11-26 02:58:15 +01:00
pancake cd35cf4508 * Added 'g' command to use r_egg api from RCore 2011-11-14 10:10:55 +01:00
pancake cd96e35ec9 * Add ragg2 -e [encoder] to specify an encoder
- Added dummy 'xor' encoder. needs to be implemented
* Various fixes in libr/egg/p/*.mk -- requires make mrproper
* ragg2 -L list encoder and shellcode plugins

--HG--
rename : libr/egg/p/egg_x86_osx_binsh.c => libr/egg/p/egg_exec.c
rename : libr/egg/p/x86_osx_binsh.mk => libr/egg/p/exec.mk
2011-11-14 02:04:27 +01:00
pancake 33f045c3d6 * Add ragg2 -B to get user-defined hexpair bytes
* Use R_MEM_ALIGN() in r_egg_run() and rasc2
  - Fix execution of shellcode eggs
* r_egg plugins now support multiple architectures and operating systems
2011-11-14 01:17:13 +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 94f905cfe0 * Do not build rasc2 anymore
* ragg2 now works better
  - Show bitsize in ragg2 -L
  - Added a sample plugin for x86-64 osx shellcode
    - command can be configured, suid can be enabled
* Minor fix in r_buf api

--HG--
rename : man/rasc2.1 => binr/rasc2/rasc2.1
2011-11-13 04:47:56 +01:00
pancake e0fc376dab * Fix some t-*.sh scripts (rollback)
* Initial working version of shellcodes inside r_egg
  $ ragg2 -i x86.osx.binsh -b 64 -k osx -f mach064 -o a.out
  ragg2 -L : list all plugins
  ragg2 -i <shellcode-plugin> : select shellcode
  ragg2 -r : show raw bytes
  ragg2 -x : execute -- fails :(
* Use r_lib in r_egg
  - User defined shellcode plugins can now be loaded on runtime
* Fix append_bytes in r_egg api
* Implement r_egg option_{get|set}
* Use working shellcode for x86.osx.binsh example (64bit)
* Update pkgconfig templates
* Add -D flag to rasm2 (show hex and asm)

--HG--
rename : libr/egg/p/x86_osx_binsh.c => libr/egg/p/egg_x86_osx_binsh.c
2011-11-13 04:08:08 +01:00
pancake 1b440bf9d2 * Add ragg2 -I to prepend include path directories
* Enhacements in r_egg library
  - Add support for including files
    - bla.r@include($PATH);
  - Proper support for goto() keyword
  - Add support to get and set environment variables (need more work)
    - PATH@env(/bin);
  - Fix /* */ comment parsing code
2011-09-20 01:53:15 +02:00
pancake 0a14411bc1 * Added README documentation for libr/egg programming language
* Add -O flag to ragg2 as an alias for -o a.out or -o <file> (without extension)
* Add rabin2 -M (get main) for Java Class files
* Add emit_trace (code tracer) for r_egg. useful to debug
  - ragg2 -a trace hello.r
  - Add emit->jmp() function pointer and emit->retvar
  - many fixes in function calls and definitions
  - Added support for 'break;' 'break();' and 'goto();'
  - Added .ret variable as an alias for eax, rax or r0
2011-09-19 02:39:33 +02:00
pancake 096b7eb406 * Fix mingw32 build 2011-09-14 12:37:26 +02:00
pancake f5228044f1 * exit 1 if egg assemble or compilation fails
* Simplify x86nz assembler jumps
  - Fix 'test reg, reg'
* Minor simplification of entropy.c
2011-08-14 14:11:15 +02:00
pancake c53a78bd88 * Add ragg2 -F (-f native)
- Uses pe on w32, mach0 on osx and elf everywhere
* Apply msdn rsc2 script fixes from capi_x
* Remove comments from ragg2/t/hello.r
2011-08-10 15:42:54 +02:00
pancake b3cefac08b * Make while() and .var0-= statements work in r_egg lang
- Added support for 'add|sub [reg+delta],n' opcodes in x86.nz
* Add emit_init() function pointer to fix entrypoint issues
  - ebp has no valid value defined on entrypoints
2011-08-10 11:24:15 +02:00
pancake 06e98dadb1 * Add -k flag to ragg2 - select kernel
- ATM only support for linux and osx
  - Do not show asm when -f is passed
  - Added 3 test programs for osx/linux in ragg2
* Add support for 'lea' opcode in x86.nz
  - Support more 'mov [off], reg' opcodes
  - Lot of new test cases in test.nz
* Fix some segfaults and parsing bugs in egg/lang

--HG--
rename : binr/ragg2/exithello.r => binr/ragg2/t/exithello.r
2011-08-09 02:03:12 +02:00
pancake 1f48797bfb * Fix test reg, reg; mov reg, [reg] ; mov reg, [reg+off] in x86.nz
* First hello world working with ragg2 on linux-x86-32
  - Named exithello.r .. run cd binr/ragg2 ; make test
2011-08-09 00:10:12 +02:00
pancake 1733e6d8a9 * Use r_bin from ragg2 to create ELF/PE/MACH0 bins 2011-08-08 15:00:42 +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