Commit graph

2298 commits

Author SHA1 Message Date
zlowram
60b62560f1 Added anal hints to specify type base on disasm 2016-05-21 19:47:49 +02:00
Anton Kochkov
cc39d55be2 Fix PowerPC check in defines 2016-05-19 13:46:41 +03:00
pancake
7f80a159c3 More powerpc blindfixing 2016-05-19 12:27:58 +02:00
Riccardo Schirone
8727840e90 anal/fcn: use getter/setter to access the size of a RAnalFunction
This is one of the first steps to improve analysis. This way we'll have
one single place to change if we want to change the meaning of the
"size" field. (size -> realsize)
2016-05-19 01:50:50 +02:00
Sven Steinbauer
901b145f33 Inline r_swap_* functions [fix #4895] (#4902) 2016-05-18 10:13:26 +02:00
pancake
39947f0865 Fix #4912 - Add rarun2 option to specify timeout signal to be sent 2016-05-17 10:41:33 +02:00
pancake
c627fb3bec Add colors in afll and fix max stack 2016-05-16 03:46:23 +02:00
Álvaro Felipe Melchor
6b827c1563 Fix #4796 - Add dbm aka module relative breakpoints 2016-05-16 01:00:11 +02:00
pancake
80ea7427bb Indentation fixes around the previous commit and beyond 2016-05-15 10:40:57 +02:00
Joshua J. Drake
29c2670039 Fix #4560: Handle recoils well with swstep=true
When resuming after (during) recoil from a breakpoint, the swstep
implementation would fail to advance. In short, the debugger would immediately
interrupt again because r_bp_restore was re-setting the original breakpoint
just before continue. The following changes fix this issue:

1. Modify r_bp_get_in to stop including the byte after a breakpoint. This was
causing r_bp_recoil to fail because it thought there was already a breakpoint
on the next instruction.

2. Pass the real breakpoint address (pc - dbg->bpsize) to r_bp_recoil so
that r_bp_get_in can work properly. Stop adding the b->size there to keep it
going too.

3. Add a state flag to core->dbg to track that we are in the midst of a recoil.

4. When continuing from recoil (in r_debug_continue_kill), restore all
breakpoints except the one we just hit (with the new r_bp_restore_except) to
avoid hitting it again. Once we move past this instruction, that breakpoint
will be set again.
2016-05-15 10:19:24 +02:00
pancake
23dcb486ea Fix some minor memory leaks, Properly make check_fcn public 2016-05-15 02:43:10 +02:00
pancake
02eb896897 Handle data refs in dalvik analysis 2016-05-14 10:40:03 +02:00
Joshua J. Drake
83baa272c8 Try for C99 compatibility per xvkilka's comments 2016-05-14 08:42:56 +03:00
Joshua J. Drake
83a76b7158 Propagate location information in perror
The "r_sys_perror" function previously would use "perror" on UNIX resulting in
location information of the "perror" callsite being shown. Renaming
"r_sys_perror" to "r_sys_perror_str" and replacing the original identifier with
a macro ensures that the displayed information is useful.

Further, this addreses a TODO that makes this functionality work on both
Windows and UNIX by moving these macros outside of the UNIX #if. The (now)
"r_sys_perror_str" is already implemented for both platforms. Let's use it!
2016-05-14 08:42:56 +03:00
pancake
f18be0bb99 Fix several pointer arithmetic issues in r_endian.h 2016-05-13 11:45:00 +02:00
rene
695d9a0d04 added shortcuts for every node in graph view
fixes mentioned in the pr
fixed the Vp issue mentioned in the pr
fixes the mentioned parts
changed reallocation size

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-12 23:49:30 +02:00
Rakholiya Jenish
502870f07b list all encoders/decoders supported by woE/woD and rahash2 -E/-D (fix #4851)
list all encoders/decoders supported by woE/woD and rahash2 -E/-D (fix #4851)
2016-05-11 22:25:54 +02:00
pancake
3d89f2cc21 Add RAnal.Stack.RESET and handle it for arm64 2016-05-11 12:59:32 +02:00
pancake
35ec317f2f Support shift << and >> in RNumCalc 2016-05-11 00:28:42 +02:00
Riccardo Schirone
15c1197636 util/print: use screen_bounds to store the first non visible address 2016-05-10 22:15:24 +02:00
pancake
eabe6512f2 Fix #4815 - Implement HexII print format (ref: http://corkami.googlecode.com/svn/trunk/src/HexII/) 2016-05-10 00:18:21 +02:00
Álvaro Felipe Melchor
b7cc6c04d7 LDID parse signature in mach0 binaries
* added iC command to show signature info

in the case of mach it shows entitlements

* added rabin2 -OC to get signature info from binary

* change swap to r_read_bleX new API

* change eprintf to r_cons_printf

* add const char in plg->signature
2016-05-09 23:42:28 +02:00
Rakholiya Jenish
82574209b1 rc6 support (#4826)
fix warning
2016-05-09 16:51:26 +02:00
pancake
7676272b18 Add sj and s= commands 2016-05-09 10:39:19 +02:00
Damien Zammit
964d12b392 ESIL: add floating point instructions (#4794) 2016-05-07 12:32:06 +02:00
Rakholiya Jenish
3019bb477c Add support for punycode via woE and woD and rahash2
Also add aes-cbc support by getting IV from user
2016-05-07 12:31:13 +02:00
Damien Zammit
632dccc217 Remove LIL_ENDIAN macro and configure option
TODO: Remove other endian cruft from:
- hashing algs
- judy
- squashfs
- grub
- tms320

Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-05-06 10:21:55 +02:00
pancake
bbb7b8412b Implement experimental cmdback in rap server and client 2016-05-05 01:20:23 +02:00
Damien Zammit
af0a865d9f WIP - Totally remove host endianness dependence
- Adds endian aware functions
- Removes references to host endian
- Uses binary detected endianness else tries LE and restricts by RAsmPlugin
- Fixes gdb debugger endianness when debugging BE qemu gdbserver

Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-05-04 23:42:17 +10:00
Riccardo Schirone
ed80f726f6 core/graph: remove esil modes
core/cmd_debug: use just one if instead of two nested
2016-05-04 10:18:20 +02:00
Sven Steinbauer
9d68cf74f8 Colour current graphviz nodes and make colors configurable
Colours current node in Graphviz output (`ag` command) 'lightblue'.

Add `graph.gv.current` option to config with default to `false`

* White space fixes

Spaces before parens

* Make GV colour configurable

Using existing colours from the palette. Changes boxes from
`lightgray` to `gray` and allows settings for traced boxes, box colour,
and current box colour.
2016-05-04 00:50:33 +02:00
pancake
08310a99cd Add io.0xff to define the value to fill unallocated area 2016-05-03 23:09:00 +02:00
pancake
6261fe32fb bugfixes + testsuite for the Internal Swift demangler 2016-05-03 04:31:36 +02:00
pancake
1f7db90e41 Priorize keystone plugins and other random changes 2016-05-02 02:46:01 +02:00
pancake
b417da6d4d Add setarch/(from|to).string simplified RAsm APIs 2016-04-29 11:30:38 +02:00
Davide Balzarotti
86760900b1 Added color support for the hud.
- Fix issue #3570

* new matching algorithm (list of space-separated words, case insensitive)
  - Fix bug #4704
* refactoring some code
* updated copyright
2016-04-28 14:02:22 +02:00
pancake
d24bc909ec Update sdb for osx-ppc and other 0.10.2 updates 2016-04-27 00:25:28 +02:00
Sergey Anufrienko
5f279870d0 fix r_socket_read, don't lose sent data on r_socket_close (mingw32) (#4718) 2016-04-26 18:57:01 +02:00
pancake
2b52b9a3e6 Demangle Swift classnames in rabin2 -c 2016-04-25 18:59:27 +02:00
Damien Zammit
1a593a6318 GDB debug for lm32 architecture (#4696)
Signed-off-by: Damien Zammit <damien@zamaudio.com>

* Missing a couple of things in previous commit

Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-04-24 23:13:00 +02:00
pancake
fafc626b55 Performance optimization for rabin2 (request vs all) 2016-04-23 00:47:00 +02:00
pancake
3225a168ef Fix syscall resolution after 0a4a2615c9 2016-04-22 19:33:23 +02:00
oddcoder
0a4a2615c9 Adding extra pass for find function argument 2016-04-22 16:25:37 +02:00
Sergey Anufrienko
d7635e085e Introduce debug plugin for QNX pdebug interface 2016-04-22 11:45:51 +02:00
Rakholiya Jenish
e1660b352a add aes-cbc encryption to rahash2
remove unnecessary comment

update man
2016-04-14 22:39:57 +02:00
pancake
93fcd7e722 Initial implementation of the anal.pushret (push+ret->jmp) option 2016-04-14 14:32:10 +02:00
pancake
20b49f1615 Implement stackptr analysis in MIPS and add ALIGN stackop type 2016-04-13 23:33:30 +02:00
Rakholiya Jenish
421a63a849 cleanup code, and use direction for specifying encryption/decryption 2016-04-13 21:54:12 +02:00
pancake
34a7837079 Include r_lib from r_bp 2016-04-13 14:48:17 +02:00
Rakholiya Jenish
27fba6fa10 Add crypto plugin for base64 and base91
update error occurence.
2016-04-13 10:34:55 +02:00