Commit graph

10197 commits

Author SHA1 Message Date
Anton Kochkov
4ce37e8083 Fix CID 1356013, 1356012 2016-05-24 10:59:16 +03:00
Anton Kochkov
636a1fea00 Fix CID 1356011 2016-05-24 10:57:17 +03:00
Anton Kochkov
caade12229 Fix CID 1338307 2016-05-24 09:04:34 +03:00
Anton Kochkov
c9ef702fc7 Fix CID 1171363 2016-05-24 09:03:15 +03:00
Anton Kochkov
efc5a6bc23 Fix CID 1356009 2016-05-24 09:01:35 +03:00
Anton Kochkov
9ff4056539 Fix CID 1356017 2016-05-24 08:59:26 +03:00
Anton Kochkov
5bc6323591 Fix CID 1356008 2016-05-24 08:57:36 +03:00
Anton Kochkov
f6b18bcb56 Fix CID 1356018 2016-05-24 08:54:39 +03:00
Roi Martin
6dca1e31bb Avoid searching out of bounds 2016-05-24 03:13:06 +02:00
pancake
fc61108f72 Fix pvj - make /enyo and /p happy 2016-05-24 03:09:24 +02:00
pancake
613d7e488d Fix afvj | json_pp 2016-05-24 02:39:39 +02:00
pancake
86213ba555 Fix #4915 - avoid naming functions as registers 2016-05-24 01:47:09 +02:00
pancake
403b2c2257 Update release-notes script 2016-05-24 01:12:22 +02:00
Roi Martin
00626b9b02 Add temporary range operator @.. (#4986) 2016-05-23 23:41:39 +02:00
Álvaro Felipe Melchor
1f4e005991 added izqq/izzqq in r2 to list only strings 2016-05-23 22:54:00 +02:00
gk
0461e567e9 Fix #4927 - Add rabin2 -qqz to list only strings (no offsets or sizes) 2016-05-23 22:53:40 +02:00
pancake
b28d5e0a9c Fix android build 2016-05-23 21:54:42 +02:00
Álvaro Felipe Melchor
fb52d91d95 fix oob in seek line 2016-05-23 22:07:32 +02:00
Anton Kochkov
ab2db9544b Fix android build - never include <bits/uio.h> 2016-05-23 21:58:57 +03:00
andrey.torsunov
2c25a8d503 Reduce memory leak for commands: oo, doo 2016-05-23 20:17:41 +02:00
Sushant Dinesh
cf456f4414 Fixes to ESIL (#4951)
- Reverted ADD and ADC to set flags based on internal variables
- Fixed calculation of carry and zero flags from internal vars
- Revert "ESIL: add floating point instructions (#4794)"
  This reverts commit 964d12b392. Since we
  decided that floating point operations will be implemented using separate
  ops, these unions are no longer needed. This commit introduced a regression
  in setting esil->old and esil->cur
- Style fixes
2016-05-23 16:39:54 +02:00
pancake
6c35a016cf More fixes fore core-linux 2016-05-14 17:32:04 +02:00
Sven Steinbauer
8da8ad740f Cleanup fixes
* For commit comments and compiler errors
* Fixes for PR comments
* fix some "infer fixes" commits

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
Sven Steinbauer
5cbcdf1da7 Infer fixes for bin
Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
Sven Steinbauer
599b6553e4 Infer fixes for asm
Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
Sven Steinbauer
9e6d4f2709 Anal infer fixes
Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
Sven Steinbauer
eef32d0260 First few fixes for infer scans
Fixes a few memleaks and several NULL dereferences

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-23 11:25:44 +02:00
Roi Martin
4cf81df3bc Fix #1476: respect search.from and don't seek on /m (#4973) 2016-05-23 11:25:17 +02:00
Oscar Salvador Vilardaga
89218c49af Fix useless pnote pointer and small fix in linux-core-dump 2016-05-23 11:24:14 +02:00
pancake
2f908ce238 Fix 22 covs in linux-core-dump 2016-05-23 11:19:29 +02:00
Roi Martin
ff24d2921c Fix #4205: hex search + binmask + small bs (#4970) 2016-05-23 00:07:25 +02:00
Ahmed Mohamed Abd El-MAwgood
23f4f00b78 fixing the tp (#4968)
bug
tp unsigned char * ebp + 0x25
it will be difficult to differ from the address and the type
but this way we will use `=` as way to differ
2016-05-22 12:28:05 +02:00
pancake
3c1462f876 Fix the tp test 2016-05-21 19:51:41 +02:00
zlowram
60b62560f1 Added anal hints to specify type base on disasm 2016-05-21 19:47:49 +02:00
pancake
0e04dbfe93 Fix #4954 - Fix crash in i8051 esil->reil 2016-05-21 16:27:11 +02:00
pancake
4de93b2703 Fix coredump file generation 2016-05-21 15:11:16 +02:00
pancake
7ad752f038 Remove the sandbox and fix more bugs in linux-core 2016-05-21 14:40:09 +02:00
pancake
64201e9c34 Fix format string for the linux-core 2016-05-21 14:35:43 +02:00
pancake
987020ece3 Fix build and more cleanup for linux-coredump 2016-05-21 14:13:33 +02:00
pancake
98246ac212 Fix memleaks, syntax, author and other bugs in linux-coredump 2016-05-21 13:36:33 +02:00
Oscar Salvador Vilardaga
876f3fd547 Initial coredump support for Linux-x86-64 (no threads yet)
* http://man7.org/linux/man-pages/man5/core.5.html
* Able to dump the header and the program headers
* Checks /proc/[pid]/coredump_filter to know which maps should be dumped
* Check for bit 6 to 0 (priv/share anon mappings, priv/share file-backed, elf hdr, priv/share huge pages)
* Missing: priv/share DAX pages
2016-05-21 12:27:13 +02:00
hummypkg
9043c1faeb Allow local variable detection for mips (#4960) 2016-05-21 12:24:42 +02:00
pancake
38d6822ebe Use negative arithmetic instead of ossitive overflow on arm64 displacement substract ESIL 2016-05-20 18:19:18 +02:00
pancake
b8af249dc4 Press any key in Vv: 2016-05-20 17:20:06 +02:00
pancake
1aff4b141d Fix #4959 - Fix linewrap in Vv 2016-05-20 17:11:29 +02:00
pancake
5ae9f9b17f Fix endian issue in the ELF parser 2016-05-19 17:28:01 +02:00
pancake
48d5e668eb No more linux-ppc blindfixing. This one is for real 2016-05-19 16:21:57 +02:00
Anton Kochkov
cc39d55be2 Fix PowerPC check in defines 2016-05-19 13:46:41 +03:00
pancake
52bfedc5ce Avoid null deref in info->arch 2016-05-19 12:30:20 +02:00
pancake
7f80a159c3 More powerpc blindfixing 2016-05-19 12:27:58 +02:00
Hamish Coleman
608c3b587f arcompact: Implement most carry codes (#4949) 2016-05-19 10:33:00 +02:00
pancake
a8d33e75a6 Add ?V? and ?Vq commands 2016-05-19 03:42:23 +02:00
Riccardo Schirone
23fee01ebd core/disasm: fix wrong reflines/fcnlines to the left of var/arg defs 2016-05-19 01:58:53 +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
Riccardo Schirone
8306463ae2 core/visual: fix cursor that jumps to wrong (next) instruction
When you use the cursor and press ENTER to jump to a target which is not
visible, it will go to the next instruction after the right target.
This patch should fix that behaviour.
2016-05-19 01:46:45 +02:00
pancake
c967514443 Add support for quiet and json listing of rasm2 -L and e asm.arch=? 2016-05-19 00:38:33 +02:00
pancake
b3093c516c Blind fix the powerpc debugger build 2016-05-16 08:37:40 +02:00
Jeffrey Crowell
f96f7802ae s/c-link/c-like in pdc help 2016-05-18 14:54:28 -04:00
hummypkg
a6bc0b39f5 Fix pseudo-code fro mult(u) - add mfhi, mflo, mul; implement ESIL mul op (#4943) 2016-05-18 15:58:04 +02:00
zlowram
bba1d404ca Added '?' message for wop command (#4942) 2016-05-18 15:50:24 +02:00
hummypkg
77a6d2a9f6 fix pseudo output for MIPS sw ... (xx) (#4941) 2016-05-18 14:15:28 +02:00
pancake
3973bc01a0 Fix #4926 - Add prz 2016-05-18 12:21:49 +02:00
pancake
4e9985d97c Initial work to support #4939 2016-05-18 12:19:27 +02:00
hummypkg
c54760269b Fix MIPS pseudo code for move op. (#4940) 2016-05-18 12:12:53 +02:00
pancake
6f243c47d7 Fix valgrind issues in Cs 2016-05-18 12:08:57 +02:00
pancake
3c0feea6cb Fixes for http.homeroot 2016-05-18 12:03:07 +02:00
Ahmed Mohamed Abd El-MAwgood
f7c47bf575 fixing all Use-after-free errors reported by llvm (#4924) 2016-05-18 11:41:12 +02:00
pancake
7f6029f17c Fix OR x86.nz test 2016-05-18 11:17:26 +02:00
pancake
2fd754a76c Fix #4938 - Implement 'or REG, NUM' in the x86.nz assembler 2016-05-18 10:48:48 +02:00
Sven Steinbauer
901b145f33 Inline r_swap_* functions [fix #4895] (#4902) 2016-05-18 10:13:26 +02:00
Hamish Coleman
afed79c033 Minor arc + arcompact cleanups and whitespace, ending with anal_arc fully indented (#4937) 2016-05-18 10:02:35 +02:00
Joshua J. Drake
79d57a4084 Don't override a user's cmd.prompt setting (#4933) 2016-05-18 10:01:39 +02:00
Jeffrey Crowell
1c69a920b6 rm free of iterator, fix leak 2016-05-17 23:44:14 -04:00
pancake
21bb0d8050 Fix Cs/Cz parameters parsing 2016-05-18 02:29:41 +02:00
Riccardo Schirone
bcf696ea14 core/cmd_meta: remove very old code that breaks metadata tests (#4935) 2016-05-18 01:26:12 +02:00
pancake
045faa6b10 Do not show xrefs in pds 2016-05-17 23:41:49 +02:00
pancake
f1a0a3eaab Fix black nodes problem with ag 2016-05-17 17:41:07 +02:00
aaSSfxxx
4362f17b1f Compute RIP-relative calls 2016-05-17 17:00:32 +02:00
pancake
f2ff8de7b9 Initialize proper fields of the RAnalOp.avr struct 2016-05-17 16:39:05 +02:00
Ahmed Mohamed Abd El-MAwgood
cd3ce9ab4e Fixing overflow in the string array 2016-05-17 14:44:52 +02:00
Riccardo Schirone
d102ed6732 core/visual: fix cmd_visual test case
Without this patch, if you run a visual command that involve the
cursor directly, the cursor will not be set.
2016-05-17 13:18:23 +02:00
Riccardo Schirone
5b92204c27 asm/arch/avr: do not print space if there are no operands 2016-05-17 13:18:23 +02:00
pancake
f11eac73a9 Fix calloc(0) in mach0 spotted by clang-analyzer 2016-05-17 12:23:39 +02:00
Riccardo Schirone
eb8e9aaad1 core/cmd_meta: it can build again 2016-05-17 11:17:29 +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
2e06158c71 Handle -- in rarun2 2016-05-17 10:36:33 +02:00
Hamish Coleman
c80611e9bf Update anal_arc to more closely match the styleguide. (#4916)
Use the sys/indent.sh script and address most of the changes it suggests

* whitespace fixes
* change all the sex_nn stub functions to macros
2016-05-17 10:26:36 +02:00
@bezjaje
a254108be0 MIPS esil small fixes, this will unbreak esil/mips regressions (#4917)
+ fixed "sub" operands order
+ fixed "add" typo (was implemented using "-" instead of "+")
2016-05-17 10:25:38 +02:00
Anton Kochkov
c75b584c7e Fix CID 1355257 2016-05-17 10:15:51 +03:00
Anton Kochkov
f943afe94a Fix CID 1355259 2016-05-17 10:12:41 +03:00
pancake
34cd4f62b1 Fix pzF tests 2016-05-17 01:05:32 +02:00
pancake
8ffa7e2b62 Fix all p*0 tests 2016-05-17 00:37:47 +02:00
pancake
52b0b0141b Bring back the --true|false-- in pdr 2016-05-17 00:12:42 +02:00
pancake
c94145242f Fix #4739 - Do not run cmd.bp twice 2016-05-16 23:17:03 +02:00
pancake
2db1f73583 Fix #4836 - bb0 size issue 2016-05-16 23:07:29 +02:00
Álvaro Felipe Melchor
f6a0cfbcb9 fix pxw endian issue 2016-05-16 23:05:06 +02:00
dequis
5d6c3ac947 libr/util/sys.c: Wrap the other backtrace() call with an #ifdef
I accidentally broke musl builds with that workaround.
2016-05-16 21:52:05 +02:00
Hamish Coleman
5f40ac8ad6 Implement jump delay analysis (#4901)
* Add archinfo details
* Add register profile details
* Show jump delay analysis - allows writing regression tests

* Fix decoded size of four-byte NOP
* Fix bugs found writing regresion tests:
** Jumps are not relative
** cut-and-paste error with some calls

* mark an illegal load destination
* Remove special case for the ignored aa field in load
* Factor mode_zz handing into its own function
2016-05-16 21:48:52 +02:00
pancake
28f64c83b9 Fix #4897 - Rename /# into /h 2016-05-16 21:48:22 +02:00
Joshua J. Drake
fed2998627 Fix "pxrj" output (#4908) 2016-05-16 21:07:05 +02:00
Anton Kochkov
49912c0226 Do not use backtrace if it's not available 2016-05-16 12:42:49 +03:00
pancake
50a46a954f Sort bbs by offset in pdr and drop the noisy true/false 2016-05-16 04:39:58 +02:00
Sushant Dinesh
8ffca4d175 Adds ESIL for x86: CMOVcc instructions (#4884) 2016-05-16 04:07:23 +02:00
dx
cbac4c38e1 libr/util/sys.c: Avoid malloc() calls in the signal handler (#4896)
Using functions like malloc() in async signal handlers is unsafe, and
may result in deadlocks.

Turns out that backtrace() is not safe either because its initialization
code uses dlopen() and malloc() and others, but this can be workarounded
by calling it once outside of a signal handler.
2016-05-16 04:06:59 +02:00
pancake
9cb987c091 Enhance afl output with color and fcnsize vs fcnrange hints 2016-05-16 04:06:45 +02:00
pancake
c627fb3bec Add colors in afll and fix max stack 2016-05-16 03:46:23 +02:00
pancake
dad8b434c4 Show real function size by default in afl 2016-05-16 03:06:39 +02:00
pancake
f3e6f386bf Fix RCons.less first line not shown 2016-05-16 02:59:42 +02:00
pancake
5239a8c599 Fix #4789 #4621 #4598 - implement afll : a verboser function list 2016-05-16 02:56:48 +02:00
pankajkataria
9a6c6e9e60 Updated-afl 2016-05-16 02:15:28 +02:00
pancake
d9cdd29268 Fix endian issue in crc16 and crc32 2016-05-16 02:08:59 +02:00
pancake
5683e45cb2 Move hash commands from # to ph 2016-05-16 02:08:55 +02:00
Álvaro Felipe Melchor
6b827c1563 Fix #4796 - Add dbm aka module relative breakpoints 2016-05-16 01:00:11 +02:00
pancake
a2fb171a37 Add R2PM_WWWROOT, update www-t and add http.homeroot r2 var 2016-05-16 00:59:29 +02:00
pancake
411cad06e2 Update r2pm manpage and fix #4843 2016-05-15 23:54:47 +02:00
Álvaro Felipe Melchor
6ea6301846 fix indentation mach-o/loader.h 2016-05-15 23:41:39 +02:00
Álvaro Felipe Melchor
aad08a0002 fix oob parse_signature in mach 2016-05-15 23:41:39 +02:00
pancake
1ea99fd31c Update to acr 0.10.2 and show HOST BUILD TARGET in REPORT 2016-05-15 23:02:59 +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
942e3e0da5 Fix #4862 - Fix all pending covs 2016-05-15 02:04:40 +02:00
pancake
65ffbb12ce Fix wwwroot for android 2016-05-14 16:27:58 +02:00
pancake
83c3f5cd3f Add v alias for V 2016-05-14 16:42:41 +02:00
Riccardo Schirone
c169073c74 Fix #4080 : remove assumption that functions are contiguous
* anal/p/anal_java: remove function that does nothing

* anal/fcn: workaround for java analysis
2016-05-14 16:37:24 +02:00
Ahmed Mohamed Abd El-MAwgood
7ab187841f Add initial support for asm.calls 2016-05-14 11:04:07 +02:00
pancake
22989f1ce9 Workaround for x86.nz inc [eax] 2016-05-14 10:59:54 +02:00
pancake
02eb896897 Handle data refs in dalvik analysis 2016-05-14 10:40:03 +02:00
Riccardo Schirone
1c7119401a core/graph: improve layer assignment algorithm
It should fix some layer problem on some binaries like ls-linux64 and in
the presence of self-loop. The previous algorithm could assign the same
layer to two nodes that are connected with an edge (and it should never
happen, because they have to be on different layers).

This patch uses the topological sort of a graph to assign the layer.
2016-05-14 10:37:55 +02:00
Damien Zammit
79728e837d Fix #4879 - warnings in esil 2016-05-14 10:33:09 +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
fad425ec06 Fix perror calls that already pass the function name 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
Álvaro Felipe Melchor
647b4f29b5 Fix #4808 2016-05-13 21:52:28 +02:00
pancake
d898e8e201 Fix segfault in swift demangler 2016-05-13 17:53:31 +02:00
Sven Steinbauer
074b327c1c Fix #3644 : Add SIB addressing support to nz compiler 2016-05-13 11:45:54 +02:00
pancake
f18be0bb99 Fix several pointer arithmetic issues in r_endian.h 2016-05-13 11:45:00 +02:00
Sven Steinbauer
278c868693 Add autocomplete for wxf
Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-13 11:33:16 +02:00
Riccardo Schirone
d9e3a290c1 libr: fix compilation warnings
libr/util/graph: add some comments to the API
2016-05-13 09:57:55 +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
a13d46b295 fix CID 1355197, 1355198 and 1355199
cleanup

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2016-05-12 23:10:37 +02:00
Hamish Coleman
a876fa504e Arcompact coverity changes
* fixed invalid compare

* Attempt to fix coverity's detection of 'Suspicious implicit sign extension'
2016-05-12 04:32:15 +02:00
Jaime Peñalba
5924510994 ESIL gb fixes
* ESIL gb: fix for loading or adding from sp+offset

* ESIL gb: fix for stores to [hl] not using proper source register
2016-05-12 04:31:09 +02:00
Álvaro Felipe Melchor
56099e9b67 fix issue when checking for oob - coverity scan 2016-05-11 23:14:51 +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
8b61811a75 Do not set asm.bits depending on CPSR to give more freedom to the user 2016-05-11 15:38:26 +02:00
SkUaTeR
75ea9cea3c Fix w32 debugger 2016-05-11 13:09:40 +02:00
pancake
3d89f2cc21 Add RAnal.Stack.RESET and handle it for arm64 2016-05-11 12:59:32 +02:00
Sven Steinbauer
45093ffb49 Fix #4751 - Add wxf command 2016-05-11 11:58:26 +02:00
Rene Laemmert
47fd9f7169 Added pushf* and popf* for x86 esil 2016-05-11 11:38:06 +02:00
pancake
9a86edb6b3 Use '0' in visual to seek at the beginning of the function and fix r2 -AAAAA 2016-05-11 04:25:16 +02:00
pancake
0baacfe852 Fix use of aae in aaaa 2016-05-11 04:09:39 +02:00
pancake
242fd0309d Add arm64 support for aae 2016-05-11 04:07:51 +02:00
pancake
1afb3b1e62 Handle SVC in anal.arm64 2016-05-11 03:06:42 +02:00
pancake
35ec317f2f Support shift << and >> in RNumCalc 2016-05-11 00:28:42 +02:00
Sven Steinbauer
5ad7b9e2f2 Expand on error message for unsigned OSX binary
If r2 is unsigned the message the user gets when trying to debug with it
isn't clear as to what the problem is. Add a line to suggest most likely issue and go see the docs to get a cert.
2016-05-10 22:16:14 +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
Sven Steinbauer
97a8fe9657 Make graphviz config options clearer 2016-05-10 22:12:50 +02:00
pancake
b4bb247791 Add nop for arm64 assembler 2016-05-10 11:22:13 +02:00
Hamish Coleman
302b9a559c Arcompact whitespace (#4839)
* Minor whitespace cleanups
* Follow styleguide for switch statement indenting
2016-05-10 02:40:49 +02:00
pancake
1b135bc93a Fix #4710 - Fix command injection in swift-demangle 2016-05-10 00:50:09 +02:00
pancake
cf94e318ac Fix #4795 - pcp for > 256 blocks 2016-05-10 00:39:31 +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
pancake
9100a21da5 Fix #4831 - aeim creates a section for io.sectonly=true 2016-05-09 23:23:45 +02:00
pancake
919424f5ed Several bug fixes for the arm32 esil emulation and static analysis 2016-05-09 23:08:25 +02:00
pancake
7c0dd4ef23 Fix indentation issues in anal.arc 2016-05-09 19:21:34 +02:00
Hamish Coleman
6091894ac8 Improved Arcompact anal module
The rewrite the ARCompact analyser code started because I noticed that the
older code was really not decoding the binary I was working on properly.

Specific things that I noticed were:
* Scrolling backwards scrolled forwards
* Jump targets were shown from apparently random opcodes
* Analysis really didnt find anything
* The anal code was essentially hardcoded for big endian targets (and mine
  was not, so instruction decoding was largely misfiring)

I read the ARCompactISA Programmers Reference guide and implemented decoding
for most instructions.  Specifically, I ensured that all the instructions that
had limm data were decoded with the correct length and that all the jump or
branch targets were correctly calculated.

As I have not previously looked at anal plugins before, I expect I have
messed up a bunch of the assumptions that the anal system makes.

Among the issues that I still have is that the analysis will find
instructions (and thus xrefs, functions, etc) in "unaligned" locations.
This might just be an artifact of the fact that not all my data is marked
as data, but it feels like there might be something I have missed.

Still remaining TODO are most of the 32bit general purpose instructions.

* BUG: missing break in switch
* Implement missing general instructions in ARCompact anal
* Only set op->fail on jump instructions for ARCompact
* ARCompact: analyse calculated pointers and immediate values in load/store/move instructions
* Address styleguide issues
* Remove unnecessary brackets
* Use standard endian swapping functions
* The maximum instruction length is only 8 bytes, adjust the de-swizzler appropriately
* BUG: I'm an idiot, fix the array size
* Move the opcode 4 General Operations to its own function for clarity
* Bring back the quick and dirty debug output by consolidating all decoded fields into a structure
* Factor out common code used in genops jumps and calls
* Remove some magic numbers by using defines for the registers
* Missed a field when converting to the struct
* Record the size of the opcode
2016-05-09 19:05:11 +02:00
pancake
a64622606c Do not show analysis messages when -q 2016-05-09 19:01:37 +02:00
Ahmed Mohamed Abd El-MAwgood
d4e4bcf6f4 off by one calculating string start (#4828) 2016-05-09 17:38:11 +02:00
pancake
735ec47da4 Fix #4816 - load libraries if bin.libs=true (wip) 2016-05-09 17:24:12 +02:00
Rakholiya Jenish
82574209b1 rc6 support (#4826)
fix warning
2016-05-09 16:51:26 +02:00
Ahmed Mohamed Abd El-MAwgood
00faea8023 FIX #4782: adding afCa to r_core_anal_all (#4805) 2016-05-09 16:04:54 +02:00
Sushant Dinesh
e31c778ccd Fixes MOVSD (#4811) 2016-05-09 15:27:18 +02:00
Sven Steinbauer
766b9ec4f0 Add support for dword offsets (#4825)
* Add support for dword offsets to internal assembler

Internal assembler produces incorrect opcodes for offsets that were
greater than a short.

    rasm2 "mov eax, [eax + 1337]"
    8b8039

This adds support for values >127.

    rasm2 "mov eax, [eax + 1337]"
    8b8039050000

producing the same output as the `nasm` assembler.

* Fix support for negative short and dword offsets

Handle negative offsets for `mov` instructions both short and dword
sizes.

* Whitespace fixes

* Remove rogue character

Remove the reogue `:` that got into the code
2016-05-09 15:25:20 +02:00
pancake
91a052f971 Fix #4817 - Deprecate file.analyze 2016-05-09 11:33:17 +02:00
pancake
8a05a74cfb Fix #4819 - honor arrows in V! 2016-05-09 11:13:37 +02:00
pancake
47b861b975 Update seek command help 2016-05-09 10:58:06 +02:00
pancake
7676272b18 Add sj and s= commands 2016-05-09 10:39:19 +02:00
Damien Zammit
9cb03bab32 Cleanup endianness in crc32 and xxhash 2016-05-09 08:56:48 +02:00
Damien Zammit
5e1ad580db build: fix warnings 2016-05-08 12:21:11 +02:00
Damien Zammit
5995ef75e7 x86.cs: Fix POPA{LW} esil 2016-05-08 00:10:06 +02:00
pancake
cafc19f5a3 Demangle two more tests in Swift 2016-05-08 00:09:14 +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
Jeffrey Crowell
056f8a7efa fix div by 0 and memleak in elf.c
CID 1338361
CID 1355149
2016-05-07 00:39:28 -04:00
Álvaro Felipe Melchor
6c7d91c5c4 Fix #4749 - fix parsing dynamic section 2016-05-06 22:24:41 +02:00
Sven Steinbauer
7c0b3eb64a Fix #4745 incorrect assembly for x86 mov (#4791) 2016-05-06 16:08:41 +02:00
pancake
51955396c2 Add comparator demangling in swift-sd 2016-05-06 10:39:44 +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
abf63d018f Fix memleak reported by coverity 2016-05-05 16:30:55 +02:00
pancake
4b42e27969 Fix b64 warnings 2016-05-05 16:06:15 +02:00
Ahmed Mohamed Abd El-MAwgood
f6c24f426f Adding support for handling sp registers at parsing 2016-05-05 15:48:00 +02:00
pancake
bbb7b8412b Implement experimental cmdback in rap server and client 2016-05-05 01:20:23 +02:00
pancake
7d49075504 Cleanup io.rap 2016-05-05 00:04:44 +02:00
pancake
a32357f55a Cleanup rtr.c 2016-05-04 23:32:29 +02:00
Ahmed Mohamed Abd El-MAwgood
d08de89727 Add support for esp register in afCa afCa 2016-05-04 22:20:58 +02:00
Rene Laemmert
0595fbf4f6 Fix #4760 removed aap from aaaa 2016-05-04 22:19:50 +02:00
pancake
84ab4792fa Fix #4653 - =[fd][cmd] is working again 2016-05-04 20:08:38 +02:00
pancake
adb70234ff Fixes for asm.fcnlines and endian issues for esil + disasm 2016-05-04 17:13:44 +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
pancake
1b29487ba6 Fix all swift demangler oob reads 2016-05-04 15:32:57 +02:00
pancake
1f82c105fb Fix doublefree and regprofile for FreeBSD 2016-05-04 13:28:53 +02: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
Jeffrey Crowell
9bdbe5c472 fix mips regprofile (s8/s9 arent real, t8/t9 are):
closes #4772
2016-05-03 23:49:38 -04:00
pancake
63c7880c35 Fix #4770 - Honor graph.from|to in agc 2016-05-04 01:59:11 +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
d4cf8292b0 Fix io.0xff bug 2016-05-04 00:47:35 +02:00
pancake
4546355af3 Add support for ascii-art debug tracing call graphs 2016-05-04 00:43:08 +02:00
pancake
bbc3e4e24e Fix aggi;V, agc* and add proper callgraph support in V 2016-05-04 00:11:28 +02:00
pancake
08310a99cd Add io.0xff to define the value to fill unallocated area 2016-05-03 23:09:00 +02:00
pancake
a83d9c1827 export MAKE in sys/install.sh 2016-05-03 22:29:56 +02:00
pancake
32fc67d63e Add support to demangle function extensions for Swift 2016-05-03 22:25:40 +02:00
Fabian Yamaguchi
122e1d55a8 Fix #4726 - Make sure that the destination register is not reported as "read" in an ESIL eq operation 2016-05-03 19:42:00 +02:00
pancake
bac256c65c Add support for protocol extension in Swift demangler 2016-05-03 05:26:23 +02:00
Jeffrey Crowell
9518841434 refactor includes (#4757) 2016-05-03 04:52:41 +02:00
pancake
5014da9f1c Fix crash and autodetection in Swift demangler 2016-05-03 04:45:17 +02:00
pancake
6261fe32fb bugfixes + testsuite for the Internal Swift demangler 2016-05-03 04:31:36 +02:00
Maijin
179b1243bd Add p8f command 2016-05-03 03:29:43 +02:00
Álvaro Felipe Melchor
149c7567ed improve arm/thumb detection for .so 2016-05-02 23:00:53 +02:00
Álvaro Felipe Melchor
e805d701db Fix #4649 2016-05-02 18:24:34 +02:00
pancake
1f7db90e41 Priorize keystone plugins and other random changes 2016-05-02 02:46:01 +02:00
pancake
e18e1ffd36 Fix aav for 64bit pointers 2016-05-01 23:00:08 +02:00
Ahmed Mohamed Abd El-MAwgood
eb185abff4 adding intital support to --omit-frame-pointer FIX #3735 (#4742)
* adding intital support to --omit-frame-pointer FIX #3735

* makeing afCa arch independent to some extent
2016-05-01 14:48:04 +02:00
v14dz
3226ec5b08 Remove duplicate 'q' option displayed in the visual define menu (Vd) (#4740) 2016-05-01 14:47:44 +02:00
pancake
b417da6d4d Add setarch/(from|to).string simplified RAsm APIs 2016-04-29 11:30:38 +02:00
Riccardo Schirone
3c2355ab27 cons/hud: remove duplicated code in strmatch and fix bug with spaces 2016-04-29 11:05:58 +02:00
Rakholiya Jenish
9991f05e85 fix POP and POPF (#4733) 2016-04-28 19:02:51 +02:00
Rakholiya Jenish
e9efad51e4 fix XCHG output while memory access (#4732) 2016-04-28 18:59:45 +02:00
rene
f8c7c8a95b fixes pushal and adds popal for x86 2016-04-28 17:20:42 +02:00
pancake
b9eca47b02 Add regprofile for linux-powerpc (via @crowell) 2016-04-28 14:37:29 +02:00
pancake
af78b8e37f More osx-ppc build fixes. Almost there 2016-04-28 14:33:51 +02:00
pancake
360280a9b2 Fixes for the previous commit 2016-04-28 14:12:11 +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
Sergey Anufrienko
73af2ed183 x86 esil: add NEG opcode (#4731) 2016-04-28 13:57:40 +02:00
Andrey Torsunov
60de2dc6b4 Fix couple of memory leaks. Issue #2772. (#4725) 2016-04-28 10:47:50 +02:00
pancake
534bc9ddf8 Use VBlp to preview a class method 2016-04-28 03:17:16 +02:00
pancake
4fdd8fa82d Properly restore swapbits 2016-04-28 01:50:18 +02:00
pancake
33fee7f734 Autodetect thumb code in af 2016-04-28 01:38:11 +02:00
pancake
2e58923b84 Add grep mode and colors to VB 2016-04-28 01:24:49 +02:00
pancake
c7d37b3e43 Enhance the VB class list cursor 2016-04-28 00:15:12 +02:00
Riccardo Schirone
e8e5d92d4d core/graph: update help to explain undocumented commands 2016-04-27 23:35:19 +02:00
Sergey Anufrienko
9956454135 don't add op to esil vm, use xor (#4729) 2016-04-27 17:18:54 -04:00
pancake
938f135180 Fix repeatable macro calls 2016-04-27 22:30:29 +02:00
Ayman Khamouma
b8aadff071 make macros repeatable 2016-04-27 22:18:51 +02:00
pagabuc
356160ec5c This fixes #3666 and applies the spacing convention on function def and call (#4727) 2016-04-27 22:17:19 +02:00
Sergey Anufrienko
5807c310fc add bitwise complement ops to ESIL; add NOT opcode to X86 (#4728) 2016-04-27 22:16:49 +02:00
Riccardo Schirone
26fc8f92ef libr: remove some unused variables and functions 2016-04-27 12:59:45 +02:00
rene
33bc23cbb5 added the usage of anal.autoname option 2016-04-27 12:45:34 +02:00
pancake
6dfb95e9c5 Drop some unsupported debug features for osx-ppc 2016-04-27 11:40:42 +02:00
pancake
bfc8e5318e More fixes from osx-ppc 2016-04-27 11:27:22 +02:00
pancake
13c820a7c5 More old ppc mac fixes 2016-04-27 11:03:33 +02:00
pancake
aae417badf More OSX-PPC fixes 2016-04-27 01:52:35 +02:00
pancake
032969927d More powerpc build fixes 2016-04-27 01:08:12 +02:00
pancake
d24bc909ec Update sdb for osx-ppc and other 0.10.2 updates 2016-04-27 00:25:28 +02:00
pancake
816a2286c9 Make R2DIR configurable by user 2016-04-27 00:05:57 +02:00
pancake
5f5d358ee5 Fix LIBR path for an old osx-ppc 2016-04-26 23:56:26 +02:00
pancake
f40305b34d Fix conditional instructions analysis in PowerPC-capstone 2016-04-26 23:47:34 +02:00
pancake
e9dc4ae89e Fix #4695 - no prompt after r2 -qp 2016-04-26 19:11:11 +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
d6cd018e9b Fix old behaviour for pv 2016-04-26 15:04:25 +02:00
pancake
e775f1051f Implement pv[1248] 2016-04-26 14:35:51 +02:00
pancake
94524c6577 Update capstone and android package 2016-04-26 03:03:45 +02:00
iessa alkuwari
cf39e0f12b load_omf_lname: char overflow 2016-04-25 19:05:58 +02:00
pancake
2b52b9a3e6 Demangle Swift classnames in rabin2 -c 2016-04-25 18:59:27 +02:00
Andrey Torsunov
99832fca3d Fix path escaping. Issue #4660. (#4709) 2016-04-25 15:18:58 +02:00
Andrey Torsunov
ae52382312 Rename bin.dwarf to bin.dbginfo. Issue #4688. (#4707) 2016-04-25 15:07:18 +02:00
Fabian Yamaguchi
dd4b3952d2 Fixes #4697 2016-04-25 12:53:15 +02:00
pancake
a6409f2144 strdup reg profile for xtensa 2016-04-25 09:40:04 +02:00
pancake
73b639e2af Comment noisy debug printf from @oddcoder 2016-04-25 00:06:52 +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
diouziou
45dd8bdb28 Fix wopO crash on some compiler/archs 2016-04-24 23:12:13 +02:00
Jeffrey Crowell
fed7cbdc67 fix command injection vuln in izz
(solution to blazectf task ;-) )
2016-04-24 16:31:51 -04:00
pancake
8cd8ac3b0e Workaround to show fastcall args 2016-04-23 19:25:31 +02:00
Davide Balzarotti
da1673b5d4 * BugFix: pxA did not display the last line of its output 2016-04-23 10:23:46 +02:00
rene
28b123c76a adds adc and add for x64 esil 2016-04-23 09:29:24 +02:00
Jeffrey Crowell
e0951cf874 fix Infinite looping of r_debug_reg_sync function
closes #4655

issue kill -0 to the debuggee to see if the pid is alive
2016-04-22 21:00:10 -04:00
pancake
1146525819 Fix ir* flag names 2016-04-23 02:32:56 +02:00
pancake
7e35c91f13 Fix nullderef in demangled reloc 2016-04-23 02:17:21 +02:00
pancake
d2fb776e8f Enhancements in demangler performance and for relocs 2016-04-23 02:02:03 +02:00
pancake
41cfbde641 Check once for xcrun/swift-demangle in PATH 2016-04-23 01:01:22 +02:00
pancake
fafc626b55 Performance optimization for rabin2 (request vs all) 2016-04-23 00:47:00 +02:00
pancake
a6e97491cb Fix #4666 - xcrun errors on swift binary 2016-04-23 00:13:34 +02:00
pancake
d1a409268d Fix #4686 - Segfault in ELF parser 2016-04-23 00:06:09 +02:00
oddcoder
6289fdea83 Fixing the segfault in afCl
how to get the segfault
r2 -
afCl
2016-04-22 23:40:02 +02:00
pancake
3225a168ef Fix syscall resolution after 0a4a2615c9 2016-04-22 19:33:23 +02:00
pancake
391b1ebe48 Fix several iV segfaults 2016-04-22 17:49:24 +02:00
oddcoder
0a4a2615c9 Adding extra pass for find function argument 2016-04-22 16:25:37 +02:00
andrey.torsunov
de1dac3f60 Add config option dbg.exitkills for issue #4670 2016-04-22 16:13:32 +02:00
pancake
bcf9be5070 Fix #4675 - Wrong function name reference in xrefs 2016-04-22 14:00:15 +02:00
andrey.torsunov
169f3885c3 Fix checking /proc/%d/task for existence.
Since `/proc/%d/task` is directory, it make sense to use appropriate
check function. Therefore,`r_file_exists` function is not suitable
here, because it checks for existence of regular file.
2016-04-22 13:55:19 +02:00
pancake
9ebd8b9da2 Fix OSX build for the QNX debugger support 2016-04-22 13:55:08 +02:00
Sergey Anufrienko
d7635e085e Introduce debug plugin for QNX pdebug interface 2016-04-22 11:45:51 +02:00
pancake
e00c7bc358 Handle ^C debug mode for aav 2016-04-22 11:25:42 +02:00
pancake
ee477660b6 Handle ARM immediate values in CMP and MOV 2016-04-22 10:36:30 +02:00
pancake
a74fd6c25f Use non-sigill breakpoints for ARM 2016-04-22 10:18:53 +02:00
pancake
280abd4f77 ARM can't hwstep by default 2016-04-22 10:15:22 +02:00
pancake
0dd92ebbf1 Add comments in pdc and arm.pseudo fixes 2016-04-22 10:15:17 +02:00
pancake
430073066f Several enhancements for aav and arm analysis 2016-04-22 00:55:27 +02:00
pancake
b0d91c741e Skip metadata within anal.hasnext 2016-04-22 00:03:09 +02:00
pancake
648ed4b259 Fix arm local var analysis 2016-04-21 23:55:37 +02:00
Davide Balzarotti
d1290db790 Added two commands:
aau : if aai prints info about the functions identified during the
       analysis, aau prints a list of the bytes that have not been
       identified.
 afM : prints a map (inspired by the color bar on top of IDA) that
       for each byte tells you if it belongs to a function or not.
2016-04-21 23:27:47 +02:00
pancake
3dde2588ac Fix memory leak and spacing in parse.x86.vars 2016-04-21 23:18:36 +02:00
pancake
6f446b003f Fix #4664 - wopD on large number 2016-04-21 23:18:31 +02:00
kolen
a65ea77725 Fix 'ed' opcode range resulted in overflow
Should be:
40 41 .. 4a 4b
   maps to
00 01 .. 0a 0b

Was:
3a 3b 3c 3d 3e 3f 40 41 .. 4a 4b
            maps to
fa fb fc fd fe ff 00 01 .. 0a 0b
2016-04-21 15:33:26 +02:00
Ayman Khamouma
7529c97e78 Add * variants to c and cx commands 2016-04-21 15:25:06 +02:00
Ayman Khamouma
d7126c3d87 Add bitmask feature in cx command 2016-04-21 15:22:36 +02:00
pancake
9f7f9f0ce8 Fix #4673 - dpt sync with help msg 2016-04-21 15:21:56 +02:00
pancake
0012530df6 Simplify AND x,x,y esil on mips 2016-04-21 03:41:09 +02:00
pancake
28ac42d182 Enhancements for pdc 2016-04-21 02:49:38 +02:00
pancake
4537e9877c Honor anal.gp in asm.emu 2016-04-21 02:25:49 +02:00
pancake
dc95b6b8cd Fix #4671 - ah- is working again 2016-04-21 01:52:06 +02:00
pancake
1ac0d47652 Honor aho in pd 2016-04-21 01:38:08 +02:00
Jeffrey Crowell
7c3c865ef8 io_self.c: same fixes as 96686841de and
6115d68736
2016-04-19 09:22:31 -04:00
Jeffrey Crowell
6115d68736 libr/debug/p/debug_native.c: fix possible overflow 2016-04-19 09:08:15 -04:00
rene
1c1101af77 fixed inc according to dec in esil x86 2016-04-19 07:00:56 +02:00
rene
46465b554d fixes #4479 dev [edi] in esil 2016-04-19 01:18:24 +02:00
rene
377889cbc9 fixes several esil commands (adc,add and rep mov) 2016-04-18 23:37:46 +02:00
Jeffrey Crowell
96686841de handle spaces in shared library paths
fixes #4623
2016-04-18 14:04:38 -04:00
Rakholiya Jenish
6397b810c8 fix warnings 2016-04-17 19:29:23 +02:00
pancake
17b0458ab6 Fix #4654 - Access debug map boundaries via $D and $DD 2016-04-17 19:28:43 +02:00
Jeffrey Crowell
b14de33807 fixup seek to local flags a bit better.
ref: #4615
2016-04-15 16:20:09 -04:00
Christoph Sarnowski
145688a60a Fix tricore disasm buffer copy function
- Did not take `memaddr' argument into account, resulting in wrong disassembly.
- Check boundaries
2016-04-15 15:51:28 +02:00
pancake
2b6ccd5a3f Make clean in pyc swf r2pm packages 2016-04-15 04:01:50 +02:00
rene
8ecdd7717b Fix shr, adc and add handling of cf and zf for x86 2016-04-14 22:42:20 +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
Jeffrey Crowell
6b17cfc55a fix double free on register
closes #4634

can we please review/revert/something
4c04b98b47 (diff-fa45250699a39a7bffd1e27da12ec5beR40)

i'm fearful this has broken a lot more stuff
2016-04-13 21:30:48 -04:00
pancake
adc9922c6a Workarounds for m68k.cs branch analysis 2016-04-14 00:13:34 +02:00
pancake
2d99c17980 Fixes for Vk and add more anal.archinfo (ppc, mips, sh) 2016-04-13 23:57:24 +02:00
pancake
20b49f1615 Implement stackptr analysis in MIPS and add ALIGN stackop type 2016-04-13 23:33:30 +02:00
pancake
c28dce2359 Autodefine anal.gp if loc._gp is set 2016-04-13 23:18:36 +02:00
pancake
3551ac80c8 Fix syscall optype for mips 2016-04-13 23:05:43 +02:00
NaveenBoggarapu
4c04b98b47 few memory leaks fixed 2016-04-13 21:55:48 +02:00
Rakholiya Jenish
421a63a849 cleanup code, and use direction for specifying encryption/decryption 2016-04-13 21:54:12 +02:00
mkosmach
70f00feb8e Add reloc_type to "Unsupported relocs" message 2016-04-13 21:52:56 +02:00
Jeffrey Crowell
cdfddf921c fix crash null deref in aav
closes #4629
2016-04-13 13:30:32 -04:00
pancake
34a7837079 Include r_lib from r_bp 2016-04-13 14:48:17 +02:00
Rakholiya Jenish
cfe1cc8c6c refactor the code and fix rc2 ecb implementation
Cleanup in cmd_write.
2016-04-13 12:54:34 +02:00
Rakholiya Jenish
27fba6fa10 Add crypto plugin for base64 and base91
update error occurence.
2016-04-13 10:34:55 +02:00
Rakholiya Jenish
2a68cea14c add woD, and rahash -D option
TODO done

fix error output
2016-04-13 10:34:54 +02:00
Travis Goodspeed
3ca3b4f534 This patch fixes a bug in which many MSP430 instructions would be mistaken for emulated instructions. 2016-04-12 23:11:14 +02:00
Jeffrey Crowell
aef5a179e8 disable dumping core if you're not actually dbging
fixes #4618
2016-04-12 12:38:17 -04:00
pancake
3b2d06d65e Fix iOS build 2016-04-12 17:32:14 +02:00
Jeffrey Crowell
9e7ed12a84 fix issue with snprintf, cleanup code 2016-04-12 10:09:48 -04:00
oddcoder
6a47bb5c29 Adding afAj and fixing typo in the afA output 2016-04-12 15:54:16 +02:00
Jeffrey Crowell
6860542225 add lots of nullptr checks in add_parsed_type 2016-04-12 08:55:48 -04:00
Anton Kochkov
878fa8d74c Fix breakpoints listing - missing space
My smallest commit ever.
2016-04-12 13:37:33 +04:00
Jeffrey Crowell
46bfab1950 clear out structs loaded with t before resaving
prevents corrupting if loading over the same var, closes #4614
2016-04-11 20:40:36 -04:00
pancake
6d3370d115 Implement local flag seek in r_core_num_callback 2016-04-12 01:32:11 +02:00
pancake
0274089288 Fix #4615 - seek to local flags '+.', and handle f.flag=addr 2016-04-12 00:55:03 +02:00
Jeffrey Crowell
74b5edd984 fix register get in dbg on BSD s/pc/PC 2016-04-11 12:34:42 -04:00
Jeffrey Crowell
9a77bdc7d5 fix r_debug_reg_get to use PC instead of pc in dbg 2016-04-11 12:26:33 -04:00
pancake
644c0c4930 Fix segfault in aav 2016-04-11 15:17:07 +02:00
pancake
910ec5d000 Fix conditional warning regression in format.pe 2016-04-11 13:14:35 +02:00
pancake
5ef2b3cc0f Fix many warnings 2016-04-11 12:22:15 +02:00
pancake
c6ef723055 Autocomplete aav and other sub-aa commands 2016-04-11 10:23:08 +02:00
dequis
c30c102ea4 Fix invalid free after tab-completing pf or te commands
Commands such as "pf." or "te" changed the tmp_argv_heap flag to true,
which means the completion argv is heap allocated and
r_core_free_autocomplete() should free it.

r_core_fgets() assigns a different, non-heap allocated array to argv,
sets argc to 226, and doesn't free the old one or change that flag.
So the next call to r_core_free_autocomplete() tries to free 226 items
out of tmp_argv.

This is fixed by freeing the old tmp_argv before replacing it with
radare_argv
2016-04-11 10:20:37 +02:00
pancake
c91e0a3a64 Do not emulate metadata and initial release-notes.js 2016-04-11 10:16:56 +02:00
pancake
c87d0159f3 Initialize BP in aeim and fix asm.emu's CALL in disasm 2016-04-11 02:24:21 +02:00
Alexander Couzens
7c6ec5f146 fix mips forward assembler when using negative offset
Fix 'Invalid reg name (-0x5c60)' when try to assemble
'lw t9, -0x5c60(gp)'
2016-04-11 00:58:04 +02:00
pancake
90b37aa106 More fixes and enhancements for aav and arm32 2016-04-11 00:56:48 +02:00
pancake
90098d6125 Fix for ARM32 LDR and MOV PC 2016-04-11 00:27:42 +02:00
pancake
f42e69bb3e Fix /V hitnames and add aav command 2016-04-11 00:03:14 +02:00
pancake
30ae724e89 Fix /V argument parsing 2016-04-10 23:17:16 +02:00
Álvaro Felipe Melchor
99fc0b9fef fix CID 1352385 and 1354256 again (#4601)
* fix CID 1352385 again

* fix CID 1354256 again
2016-04-10 21:28:05 +02:00
Álvaro Felipe Melchor
2f9229af43 fixed pe version info 2016-04-10 21:25:56 +02:00
Ahmed Mohamed Abd El-MAwgood
febb482077 FIX #4204: Implement fastcall function arguments (#4596)
FIX #4204: Implement  fastcall function arguments
2016-04-10 20:59:11 +02:00
Álvaro Felipe Melchor
8cd86c367e Fix oob read in pe 2016-04-10 18:43:32 +02:00
Rakholiya Jenish
402e53b030 correct and complete the blowfish implementation
minor typo fix
2016-04-10 18:04:52 +02:00
pankajkataria
4789c5d46c CID-1354256-libs.c and CID-1352385-fs.c 2016-04-10 18:04:04 +02:00
Roi Martin
fa6415f1e1 Update graph help with summary mode 2016-04-10 13:02:23 +02:00
pancake
ddd6c18974 Fix #4572 - Fix heap bof in elf versioninfo parser 2016-04-10 02:00:52 +02:00
pancake
4e0a71c0c3 Fix #4573 - fix oobread in java disassembler 2016-04-10 01:23:18 +02:00
pancake
3f7a70fb7d Fix #4564 - oobread in dalvik disasm+analyzer 2016-04-10 01:12:58 +02:00
pancake
6f4518a247 Fix #4588 - uninit memory in m68k dis 2016-04-10 01:06:16 +02:00
Rakholiya Jenish
8ea2e80354 add ROL and ROR support 2016-04-10 00:37:34 +02:00
Rakholiya Jenish
4c1c17f90a add ROT to rahash2
fix indentation

remove unnecessary header inclusion
2016-04-10 00:37:34 +02:00
Roi Martin
92ab708310 Disassembly first BB instead of first 4 insns in CG mode 2016-04-09 22:29:16 +03:00
Roi Martin
89ee2585d6 Add "summary mode" to ascii graphs 2016-04-09 22:29:16 +03:00
Álvaro Felipe Melchor
3c98a3acf1 Fix #4567, #4566 and oob write 2016-04-09 21:13:31 +02:00
Álvaro Felipe Melchor
63990bef32 Fix #4589 2016-04-09 20:05:18 +02:00
skuater
917bd004cc r_bin_per_import fixed for tiny files 2016-04-09 19:54:12 +02:00
Álvaro Felipe Melchor
400664a25c Fix #4571 - thx revskills 2016-04-09 19:09:09 +02:00
Álvaro Felipe Melchor
8009d35f13 Fix #4576 - thx revskills 2016-04-09 17:07:20 +02:00
Álvaro Felipe Melchor
8ba4c5b959 Fix #4585 2016-04-09 16:28:45 +02:00
Álvaro Felipe Melchor
79c7e5ec1f Fix #4587 - thx @revskills 2016-04-09 16:19:54 +02:00
Anton Kochkov
5bff63a7f0 Fix CID 1346910 2016-04-09 16:06:51 +03:00
Anton Kochkov
7c1a822af5 Fix CID 1352382 2016-04-09 16:02:01 +03:00
Anton Kochkov
d09eaaed33 Fix CID 1352383 2016-04-09 16:00:36 +03:00
Anton Kochkov
96c5783b5d Fix CID 1354257 2016-04-09 15:56:08 +03:00
Álvaro Felipe Melchor
60e64d49bf Fix #4563 - thx @revskills 2016-04-09 13:46:08 +02:00
Álvaro Felipe Melchor
fe0ea49a6f Fix #4577 - thx @revskills 2016-04-09 13:01:15 +02:00
Álvaro Felipe Melchor
38452b4052 Fix #4581 - thx @revskills 2016-04-09 12:49:09 +02:00
Álvaro Felipe Melchor
68d4a43aad Fix #4578 - thx @revskills 2016-04-09 12:28:26 +02:00
Álvaro Felipe Melchor
c711dfabdd remove another stray character 2016-04-09 12:06:38 +02:00
Álvaro Felipe Melchor
e7d4fdfd30 remove annoying stray character 2016-04-09 11:49:05 +02:00
Álvaro Felipe Melchor
df4cb535f0 Fix #4580 - thx @revskills 2016-04-09 11:47:35 +02:00
Álvaro Felipe Melchor
91e161a626 Fix #4568 - thx @revskills 2016-04-09 11:39:49 +02:00
Jeffrey Crowell
0503b3e741 fix #4579
ty revskills
2016-04-08 21:41:22 -04:00
pancake
4476720aa8 Fix regprofile regression 2016-04-08 13:36:15 +02:00
pancake
4217a5a5bc Honor fcn.fcnlines in fcnvarlist 2016-04-08 12:18:28 +02:00
Álvaro Felipe Melchor
2fed6d3447 Fix #2780 2016-04-08 12:11:05 +02:00
rene
d97c1c3a06 added rest of sto lod mnemonics to esil 2016-04-08 12:10:13 +02:00
Rakholiya Jenish
2e06e5159f Add imq/imj (fixes from @radare) 2016-04-08 04:05:28 +02:00
pancake
d1636fb175 Fix #4553 - e cfg.debug=true forces native 2016-04-08 03:40:53 +02:00
pancake
843fcf1e7d Implement Cz like Cs with automatic length detection 2016-04-08 03:30:21 +02:00
Jeffrey Crowell
49e81e6776 correct amount of numbers in memcpy... 2016-04-07 21:27:42 -04:00
Jeffrey Crowell
a3fd8cdcfa fix command injection on V;, allow " in comments
closes #4547
2016-04-07 21:26:39 -04:00
pancake
3ccdfbd6e8 Add asm.(symbol|section).col and honor meta in reflines 2016-04-08 02:56:42 +02:00
pancake
fe02539afb Fix some warnings for debug.mach0 2016-04-08 01:09:56 +02:00
pancake
b54614d292 Use anal reg profiles from debug.esil 2016-04-08 00:54:15 +02:00
Roi Martin
eb2040e37f Minor fix when saving xrefs to prjfile 2016-04-07 22:18:19 +02:00
Álvaro Felipe Melchor
041fc7423a fix #4539 - null dereference 2016-04-07 21:16:55 +02:00
rene
c309d707af added lodsb,stosb and did some rep cosmetic to esil x86 2016-04-07 16:22:01 +02:00
pancake
eb99ec8580 Fix android build 2016-04-07 16:20:29 +02:00
Christiane Ruetten
53b0918b59 Fixing buffer size
`r_hex_str2bin` turns every two input nibbles into a single output
byte and thus writes maximum half the input size. However, there's
the special case where it writes one additional output byte when
presented with an odd number of nibbles. Even though this results
in an error (negative of the number of bytes written), we must
ensure that at least one byte more is allocated for its output
buffer.
2016-04-07 16:05:16 +02:00
Christiane Ruetten
f5c32ee38d Fixing usage line order 2016-04-07 16:05:16 +02:00
Christiane Ruetten
3253e1c625 Extending wo* commands to use clipboard
When the [val] argument to wo* subcommands is omitted, clipboard
content is used instead. This allows, for example, to easily XOR
two memory blocks.
2016-04-07 16:05:16 +02:00
Christiane Ruetten
d82bf6a781 Revert "Adding wo*y commands using clipboard instead of [val]"
This reverts commit e6ba84cdd8.
It was merged before the review was finished.
2016-04-07 16:05:16 +02:00
pancake
5867365cd5 Add dummy work for mach0 in rabin2 -O 2016-04-07 15:42:06 +02:00
pancake
d4b26eb9ec Fix #4536 - Fix background color rcons.html filter 2016-04-07 14:22:57 +02:00
rene
186cc728f8 fix the incrementation of edi/esi in string mov 2016-04-07 11:57:37 +02:00
pancake
8a6088a0dd Fixes for ARM IT op 2016-04-07 11:52:36 +02:00
Christiane Ruetten
e6ba84cdd8 Adding wo*y commands using clipboard instead of [val] 2016-04-07 11:19:32 +02:00
rene
8b1d14e388 split normal and esil analyse for x86 and added mov<string> handling for esil 2016-04-07 11:13:46 +02:00
Roi Martin
f44112dfc6 Implement cmd PS. Fix ax{*,j}
- Add r_core_project_save_rdb for selective project dump
- Implement command PS and Ps using r_core_project_save_rdb
- Fix commands ax* and axj
- Fix r_anal_xrefs_save (it didn't save DB to project file)
2016-04-07 11:12:50 +02:00
NaveenBoggarapu
fabf7020fb Fix #4523 - Fix asm.emu + pd leaks 2016-04-07 11:11:46 +02:00
pancake
f57936012a Honor 0 in pdf 2016-04-06 02:12:52 +02:00
Roi Martin
26546e4f3a Temporary fix xrefs load in radare2's -p flag 2016-04-06 00:04:34 +02:00
Anton Kochkov
5b75d4cac7 Fix CID 1353770, 1353769 2016-04-06 00:55:20 +03:00
Anton Kochkov
c481971fc8 Fix CID 1353776 2016-04-06 00:49:14 +03:00
Anton Kochkov
858d06c361 Fix CID 1331116 2016-04-06 00:46:55 +03:00
Anton Kochkov
c24b4087d6 Fix CID 1338360 2016-04-06 00:44:33 +03:00
Anton Kochkov
45720df1ef Fix CID 1353771 2016-04-06 00:41:07 +03:00
Lukas Dresel
5a4fe03d41 Fix #4495 - rasm2 not loading all the plugins
- Fixed misplaced free(tmp) i broke
- Made plugin loading work the same in every tool.
- Removed last instances of hardcode 'LIBR_PLUGINS' string
2016-04-05 22:42:19 +02:00
pancake
29a38193e8 Use shorter checksum vars for proper alignment 2016-04-05 13:31:22 +02:00
pancake
c834239830 Find strings in more sections for PE binaries 2016-04-05 13:30:10 +02:00
NighterMan
7708ab0fc9 This fixes radare/radare2#4524 (adds type to isj) 2016-04-05 12:37:24 +02:00
Daniel Domínguez
71beec242e Coredump generation for Mach0 binaries 2016-04-05 12:03:59 +02:00
Anton Kochkov
84917a3103 Fix CID 135284 2016-04-05 12:43:41 +03:00
Anton Kochkov
d558dec5b7 Fix CID 1353073 2016-04-05 12:38:34 +03:00
Anton Kochkov
5b3f52f0b6 Fix CID 1353777 2016-04-05 11:59:58 +03:00
Anton Kochkov
9904f6ae3b Fix CID 1353779 2016-04-05 11:50:53 +03:00
Anton Kochkov
769b1593a4 Fix CID 1353780 2016-04-05 11:49:17 +03:00
pancake
4b909bad9a Fix some asm.spacy and asm.flgoff glitches 2016-04-05 01:33:57 +02:00
pancake
1c67ef8dc1 Fix #4469 - asm.flgoff for fcn vars 2016-04-05 00:56:48 +02:00
pancake
62195cc005 Fix #4502 - Implement blx for thumb 2016-04-05 00:15:45 +02:00
pancake
bbaafb6b3d Fix #4511 - r_config bool values are case insensitive 2016-04-04 23:37:20 +02:00
Álvaro Felipe Melchor
114ad79b95 fix xtr dyldcache 2016-04-04 23:28:02 +02:00
Álvaro Felipe Melchor
fc4f2a2a38 fix minor things to be able to load dyld 2016-04-04 23:28:02 +02:00
Álvaro Felipe Melchor
b0c6ae4409 Fix #4295 and #4155
This commit is the first attempt to improve relocation
recognition when dealing with relocatables elf-files
2016-04-04 23:09:58 +02:00
kolen
150f8d9faf z80 analysis: memory load and store operations 2016-04-04 22:32:50 +02:00
kolen
27103ae05f Opsize calc: dependency to z80_cr, not old z80 2016-04-04 22:32:50 +02:00
kolen
9f22f69422 Made rst syscall instead of regular call 2016-04-04 22:32:50 +02:00
kolen
994044030f Fix cases leading to HALT, made halt non-eob
(Usually HALT is used for synchronization, execution continues after it)
2016-04-04 22:32:50 +02:00
pancake
32162ef393 Add r_buf_new_file API 2016-04-04 22:30:11 +02:00
Maijin
071d17d034 fix help for arn and drn 2016-04-04 22:01:37 +02:00
Anders Kaare
7757bfc8ca adding m68k anal archinfo
this fixes backwards seek in visual mode; it previously seeked one byte
forwards instead
2016-04-04 21:27:06 +02:00
Anders Kaare
cb2d45e491 fixing m68k branch disasm bug
16bit displacement must be signed, but were unsigned. I've converted the
branch variants to 8/16/32bit signed casts rather than duplicating the
8bit ISBITSET() special case.
2016-04-04 21:27:06 +02:00
Anders Kaare
8615a6a7c6 analyze m68k jsr.w/jsr.l as calls, not jumps
function analysis would terminate when reaching a jsr
2016-04-04 21:27:06 +02:00
Lukas Dresel
cb60759219 Removed unnecessary r_lib.h dependency in r_util.h 2016-04-04 21:26:20 +02:00
pancake
d706552d2f Fix #4517 - double free in strbuf 2016-04-04 21:25:03 +02:00
Jeffrey Crowell
714ae015b5 remove dead code in cond_cs2r2 2016-04-04 13:02:49 -04:00
pancake
474fa51da7 Fix #4512 - Fix segfault in pdf with asm.emu 2016-04-04 17:13:07 +02:00
pancake
d0ddc1a226 Fix crash in bin.elf.has_canary 2016-04-04 02:15:31 +02:00
pancake
740e43eadd Fix some segfault and consistencies 2016-04-04 01:59:30 +02:00
pancake
802a793074 Fix even more memleaks 2016-04-04 01:03:31 +02:00
pancake
c01b5a6562 More memleak fixes 2016-04-04 00:52:45 +02:00
pancake
54fe1ae941 Fix uaf and another memleak 2016-04-04 00:36:18 +02:00
pancake
e8263655be Fix more memleaks 2016-04-04 00:17:57 +02:00
pancake
c9514302bf Fix some lifecycle memory leaks 2016-04-03 23:52:36 +02:00
Anders Kaare
70b35f1c48 m68k analysis failed for backwards branches
it read operands as unsigned values, e.g. an offset of -4 would become
252 instead
2016-04-03 21:51:15 +02:00
pancake
2c43b48b23 Fix back fcnsign for w32 abi 2016-04-03 18:41:50 +02:00
pancake
032b0689cc Fix fcnsign on non-windows code 2016-04-03 18:13:35 +02:00
skuater
36edff3732 fix wait routine in bochs for linux 2016-04-03 17:39:59 +02:00
pancake
9eb63df89f Fix #4502 - Implement blx address for arm32 assembler 2016-04-03 17:35:52 +02:00
kolen
31354a19fd Remove extra eob's 2016-04-03 17:18:40 +02:00
kolen
6f710a3b8e Add some more z80 analysis 2016-04-03 17:18:40 +02:00
Álvaro Felipe Melchor
593b6c85e5 Fix #4481 2016-04-03 17:02:47 +02:00
pancake
cb9315b86f Fix #4466 - null in pf*x 2016-04-03 01:43:16 +02:00
Lukas Dresel
1977400d73 Added short and long long types to t command 2016-04-03 01:15:49 +02:00
pancake
dd3ac102e5 Be arch-specific in that plt analysis trick 2016-04-02 23:58:52 +02:00
pancake
43e8692f09 Do not show stuff in aoj if not available 2016-04-02 23:45:21 +02:00
pancake
344bf13064 Add missing sym.imp.abort noreturn 2016-04-02 23:38:32 +02:00
pancake
a521f418fd Fix plt analysis check 2016-04-02 23:19:23 +02:00
pancake
af33904e7b Do not show cond if not available 2016-04-02 23:05:09 +02:00
Roi Martin
75c5c31b53 Fix double free when quitting from graph 2016-04-02 22:47:49 +02:00
Evan Shaw
58328def22 Show absolute offsets for relative branches in SNES disassembly
This makes the disassembly easier to read.
2016-04-02 10:02:27 +02:00
pancake
1571b9c251 Fix #4485 - Force eobjmp for jumps to different section 2016-04-01 19:39:31 +02:00
pancake
509c1c7447 Fix #4486 - Skip UJMP if in plt section 2016-04-01 19:37:05 +02:00
NaveenBoggarapu
7d61361361 fix some memory leaks 2016-04-01 19:25:32 +02:00
NaveenBoggarapu
f5650005bf corrected minor spelling and grammar mistakes 2016-04-01 19:25:32 +02:00
oddcoder
0c409d52e8 Fix #4478
* Add `b` key to bind selected type to current offset.
* cursor can be beyond the end of types.
* colorize title bar if scr.color.
* missing union tab.
* 'd' key doesnt works (should delete types and fields).
* ~~'a' must add a key instead ofa type if inside a struct.~~
  it is and easier to delete that stuct and recreate it with that
  extra key
* add `-` key to open cfg.editor to load types
2016-04-01 19:24:41 +02:00
pancake
c917f128fd Dont fallback from UJMP to RET and ignore eobjmp in UJMP 2016-04-01 12:24:19 +02:00
pancake
05c5ffe23e Add two missing MH flags for mach0 binaries 2016-04-01 12:10:30 +02:00
pancake
0474d1e41e Define generic conditional enums for arm and x86 2016-04-01 12:06:02 +02:00
Mizari
477986be2c Removed possible null dereference and one clang-analyzer warning squashed 2016-04-01 10:34:28 +02:00
pancake
fa4edbfa45 Fix scroll up in disasm after project load 2016-04-01 01:56:16 +02:00
pancake
cc4b08716e Honor anal.archinfo.{min|max}.opsize in Vk scrollup 2016-04-01 00:27:14 +02:00
pancake
7afc11ff39 Fix the p=X 0 tests 2016-04-01 00:02:56 +02:00
pancake
fcefa06dd1 Honor ARM conditional bits to skip bxeq lr and such 2016-03-31 23:38:25 +02:00
Álvaro Felipe Melchor
cd85e12a31 fix some memory leaks 2016-03-31 23:01:02 +02:00
Tony Wasserka
eadfeff76d Honor cursor in VX and in log messages printed in Vx. 2016-03-31 21:34:42 +02:00
Jeffrey Crowell
8afbe7527f remove double lock 2016-03-31 14:21:23 -04:00
pancake
c2b151f8c8 Fix a lot more covs 2016-03-31 13:21:51 +02:00
pancake
259816b7e6 Fix more covs for bochs 2016-03-31 13:08:39 +02:00
Evan Shaw
48450e3d96 SNES analysis improvements
* Nearly all ops have been given a type
* Set nopcode (always 1)
* Set branch conditions
* Set jump targets
2016-03-31 12:29:35 +02:00
pancake
d4d6b1e1ff Implement new commands: yl, yw, ywx, wz, and re-fix .q 2016-03-31 05:42:37 +02:00
pancake
4b72511f6a Implement ys to show clipboard as string 2016-03-31 05:15:20 +02:00
pancake
d68822c389 Honor q in scripts to stop interpreter 2016-03-31 04:48:36 +02:00
pancake
7bfa3f42cf Add graph.gv variables to set custom graphviz styles 2016-03-31 02:25:54 +02:00
pancake
4053c60295 Use vee arrows in graphs 2016-03-31 02:12:53 +02:00
pancake
c724e3b1a5 Honor ec graph.{true|false|trufae} in aga for graphviz 2016-03-31 02:03:44 +02:00
pancake
cdc6fb4687 Fix parsing of rgb colors and support html 2016-03-31 01:16:19 +02:00
pancake
a9a8fa2886 Do not show function address in graphviz's basicblocks 2016-03-31 00:16:33 +02:00
pancake
ef317a026b Fix #4462 - null deref in elf parser 2016-03-30 22:54:48 +02:00
Kitsu
3e5d281815 Fix #4436 - more help for o subcommands 2016-03-30 22:39:30 +02:00
Anders Kaare
ff21bb5fbf fixing 6502 analysis
36e42b33fe broke analysis by introducing a
new enum value. The analysis code didn't switch on the enum but rather
used it directly as an integer, so since the new SNES_OP_IMM has 5 as
its integer value the analysis code would think that the op was 5 bytes
in length.
2016-03-30 22:08:52 +02:00
pancake
7a19745932 Add missing squash.mk 2016-03-30 16:47:23 +02:00
michalbednarski
dfb3680298 Fix NULL dereference of Elf_(Verdaux) *aux 2016-03-30 16:03:52 +02:00
pancake
d9d4e7f889 Initial implementation of fs.squash and merge squashfs-tools 2016-03-30 16:01:24 +02:00
pancake
33d6a27441 Add more op.val for x86 2016-03-30 16:01:16 +02:00
pancake
400b4da257 Fix io.cache segfault 2016-03-30 16:00:52 +02:00
Alexandr
45bb5ef079 Fix #3955 2016-03-30 13:30:22 +02:00
skuater
01fce3fe8e Initital implementation bochs for linux. 2016-03-30 12:57:15 +02:00
pancake
354b9efbf2 Add ?E clippy echo and use it in ???? 2016-03-30 12:44:56 +02:00
pancake
41a280c3c6 Fix #4453 - Honor cursor in Vx 2016-03-30 12:30:51 +02:00
pancake
2177eff8e8 Fix #4450 - No more empty aga graphs 2016-03-30 12:28:44 +02:00
Mizari
ae2bcb649a Fixed #4449 2016-03-30 11:31:04 +02:00
oddcoder
f64d2bb494 Fixing coverities
libr/core/cmd_type
Incrementing a pointer which might be null: "ptr".

/libr/core/cmd_anal.c: 2319 in cmd_anal_esil()
Variable "old_arch" going out of scope leaks the storage it points to.
2016-03-29 22:44:44 +02:00
pancake
fa8fc09843 Add support to load MACH0 Core files 2016-03-29 18:40:29 +02:00
Léo Gaspard
353ff45443 Add EBC 'not' instruction decoding 2016-03-29 17:10:04 +02:00
pancake
f672804964 Rename realsize -> realsz 2016-03-29 15:33:53 +02:00
pancake
fe0c38e372 Add asm.symbol to show flag/fcns in disasm 2016-03-29 02:03:17 +02:00
Léo Gaspard
5c8a663e23 Identify external calls for EBC 2016-03-29 01:22:48 +02:00
Léo Gaspard
7595af19e3 Use decode_index32 for EBC calls 2016-03-29 01:22:48 +02:00
Léo Gaspard
ff4bce16db Actually follow UEFI spec for index{32,64} 2016-03-29 01:22:48 +02:00
pancake
e93436ee5b Show calls and refs in aai 2016-03-29 01:13:00 +02:00
pancake
089ee49261 Fix #4410 - aai command to show analysis statistics info 2016-03-29 00:39:50 +02:00
pancake
9d54015029 Handle referer in http server for CSFR protection 2016-03-28 23:38:45 +02:00
pancake
659b83fb43 Add r_lang_rust 2016-03-28 00:19:21 +02:00
pancake
d629165ec8 Remove unnecessary = NULL in bin/p/*.c 2016-03-27 23:02:29 +02:00
pancake
c74b476464 Fix tk fflush issue for /t webui 2016-03-27 17:20:21 +02:00
pancake
f6454cc5f2 Add rarun2 execve to avoid posix_spawn 2016-03-27 14:17:39 +02:00
pancake
365162d4a8 Run file.analyze only when file contains entrypoint 2016-03-27 14:05:43 +02:00
pancake
d092be54e2 API fixes for bochs and honor sandbox 2016-03-27 13:43:51 +02:00
pancake
50513097e8 Fix XSS issue with scr.html=true 2016-03-27 05:49:30 +02:00
pancake
f641200bdc Enhancements for the p=ej 2016-03-27 00:32:12 +01:00
oddcoder
e1c120e654 Fix #4390 - Fixing tl? allignment and tl* output 2016-03-26 23:21:06 +01:00
Maijin
b25f3af2d7 Add aan in rowlog 2016-03-26 19:42:11 +01:00
Maijin
616a73610c Add [@addr] in p? help via @neobrain fix #4425 2016-03-25 14:07:01 +01:00
pancake
b6d5e6c9e3 Initial implementation of the make menu 2016-03-25 11:10:16 +01:00
pancake
cd6ef644bf Fix warnings in aex command 2016-03-25 10:18:45 +01:00
pancake
f1f83276ea Fix static build with libbochs 2016-03-25 10:13:50 +01:00
pancake
32857e5fcd Fix build 2016-03-25 00:26:55 +01:00
Álvaro Felipe Melchor
2cf64fbb8a fix memory leak 2016-03-25 00:25:26 +01:00
pancake
434b8251e9 Many syntax, language, indent, naming fixes for bochs 2016-03-25 00:21:56 +01:00
skuater
c45fe4e1e7 Initial support for BOCHS (windows only for now) 2016-03-25 00:21:49 +01:00
Álvaro Felipe Melchor
2c70142294 Fix #4393 2016-03-25 00:18:48 +01:00
Darredevil
9c998618aa Fix #4362 2016-03-24 23:06:50 +01:00
oddcoder
6919b58716 adding tk* 2016-03-24 22:48:59 +01:00
oddcoder
7c5a2ef97a adding tl tl- tl-* 2016-03-24 22:47:42 +01:00
alvaro_fe
27459b7deb fix latest covs 2016-03-24 20:43:33 +01:00
pancake
c451637967 Chop swift-demangle output 2016-03-24 16:27:00 +01:00
pancake
9d62ee0ddf Fix m68k.cs disassembler issue, honor asm.cpu in anal.m68k.cs 2016-03-24 16:21:49 +01:00
Mizari
d6daa9d591 Fixed function calls for r_reg_set_bytes(reg,-1...) 2016-03-24 12:47:00 +01:00
HummyPkg
cbedd8fd33 Put esil discovered strings into strings flagspace 2016-03-24 12:46:21 +01:00
pancake
5ed68fbb72 Enhance swift-demangle support 2016-03-24 12:27:23 +01:00
pancake
8abcab79d3 Support xcrun swift-demangle for OSX 2016-03-24 00:49:43 +01:00
pancake
bf904374ef Enhance icj 2016-03-24 00:41:56 +01:00
pancake
273b20294e Add support for swift-demangle if found in PATH 2016-03-24 00:20:59 +01:00
pancake
90bc56dc43 Implement variable to get minimum map address 2016-03-23 22:42:02 +01:00
Kitsu
59fc9900f4 Added AES-128/192/256 with ECB mode to rahash2 2016-03-23 22:27:00 +01:00
Álvaro Felipe Melchor
80ef8540da fix segfault ecp 2016-03-23 22:42:57 +01:00
HummyPkg
44d3e54c44 #4403 - Find more string references for MIPS and remove some false positives. 2016-03-23 22:19:42 +01:00
pancake
a00c916028 Fix #4404 - Fix ij json 2016-03-23 22:16:50 +01:00
pancake
71bd7719c1 Fix #4409 - eco segfault and implement ecp 2016-03-23 22:13:55 +01:00
Maijin
1a3e09d1e8 Save types in the project file 2016-03-23 09:08:26 +01:00
Evgeny
8e726d0376 #4395 2016-03-23 01:37:37 +01:00
Darredevil
c68887b067 Fix ESIL for x86 INC and DEC 2016-03-23 01:36:13 +01:00
pancake
f9a36d9da8 Fixes for the last commits 2016-03-23 01:35:20 +01:00
oddcoder
a17ff1546c fixed bug with t-
see this is not the expected
[0x00000000]> q
[ahmed@localhost radare2-regressions]$ ./run_tests.sh t/cmd_types
[ahmed@localhost radare2-regressions]$ r2 -
 -- Learn pancake as if you were radare!
 [0x00000000]> "td union x{int x; int y; int z;}"
 [0x00000000]> tk*
 unsigned int=type
 unsigned char=type
 unsigned short=type
 int=type
 long=type
 void *=type
 char=type
 char *=type
 const char*=type
 uint8_t=type
 uint16_t=type
 uint32_t=type
 uint64_t=type
 type.unsigned int=i
 type.unsigned char=b
 type.unsigned short=w
 type.int=d
 type.long=x
 type.void *=p
 type.char=b
 type.char *=*z
 type.const char*=*z
 type.uint8_t=b
 type.uint16_t=w
 type.uint32_t=d
 type.uint64_t=q
 x=union
 union.x=x,y,z
 union.x.x=int,0,0
 union.x.y=int,0,0
 union.x.z=int,0,0

 [0x00000000]> t- x
 [0x00000000]> tk*
 [0x00000000]>
 now it is fixed
2016-03-23 01:19:49 +01:00
oddcoder
5383fd6772 adding tu for enums
+ indentation
2016-03-23 01:19:49 +01:00
oddcoder
e19501168a Fix #3925 2016-03-23 01:19:49 +01:00
oddcoder
9c8253dd22 fixing type in sdbforce that lead to brocken t 2016-03-23 01:19:49 +01:00
pancake
cf7a751fc5 Fix #4367 - Honor pds [num-bytes] 2016-03-23 01:18:27 +01:00
pancake
e6011f0cc2 Fix #4367 - Implement pdsf and pdfs 2016-03-23 01:13:16 +01:00
oddcoder
3c02f8ebca Fix #4355 2016-03-22 17:10:28 +01:00
oddcoder
a918b21fc5 FIX #4358 2016-03-22 17:10:28 +01:00
Kitsu
55b0769c5e Missed fix in f4618c0 of r_core_diff for proper compilation 2016-03-22 14:47:57 +01:00
pancake
f4618c0bbd Remove radiff2 -CC because we already have -A, -AA, -AAA ... 2016-03-22 13:00:02 +01:00
pancake
a461bbc536 Fix #4304 - asm.filter for m68k 2016-03-22 12:45:05 +01:00
oddcoder
ad9d8fd0f1 Fix #4354
Fix #4354

fixing indentation
2016-03-22 11:49:40 +01:00
Mizari
59d614edf1 Added drw/arw command + r_reg_arena_set_bytes 2016-03-22 11:48:42 +01:00
pancake
0dcdab6d19 Fix #4279 - do not prefix fcn. in afn 2016-03-22 02:05:23 +01:00
pancake
ac96249a99 Set anal.autoname by default for now 2016-03-22 02:00:42 +01:00
pancake
f64cae4118 Fix #4374 - ags command to show simplified flowgraph 2016-03-22 01:55:37 +01:00
pancake
218ffda4f2 Do not autoname functions by default. Add e anal.autoname 2016-03-22 01:39:43 +01:00
pancake
895a966884 Do not diff function strings, increase memlimit 2016-03-22 01:31:10 +01:00
Darredevil
b362e2d2fb Alias 'doo' command for issue #4365 2016-03-21 23:55:01 +03:00
Álvaro Felipe Melchor
6e4c68f6f6 Fix oob read in cmd_anal.c 2016-03-21 16:41:18 +01:00
pancake
498b9d0fc4 Fix memleak in esil for x86.cs 2016-03-21 13:28:07 +01:00
pancake
b56d1c01bf Show header for pxd1 and pxd2 2016-03-21 11:18:09 +01:00
Maijin
2a82395c3f Typo Exapmle => Example
Typo Exapmle => Example
2016-03-20 13:51:33 +01:00
oddcoder
8b9c7e3a7c td? is not really helpful #4352
fixing indentation
2016-03-20 14:24:06 +02:00
oddcoder
9013158f4d output of t is wrong #4351
adding struct support to t

adding enum handling to `t`

and optimising the stuct type finder
2016-03-20 14:23:38 +02:00
pancake
1e4c9ba859 Fix pushal esil for x86-32.cs 2016-03-20 03:12:26 +01:00
pancake
a5fe52c1d3 Fix x86.esil for xchg, inc [mem] and set{e,ne,o,no,p,np,s,ns} 2016-03-20 03:03:26 +01:00
pancake
449a13e24e Show trap code name in the esil dumpstack 2016-03-20 03:03:00 +01:00
pancake
d1b36b01ec Fix #4267 - Prefix all env vars with R2_ 2016-03-20 02:24:17 +01:00
oddcoder
75d290833e removing support td-
| td-<name>          Undefine type by name
| t- <name>          Delete types by its name
their is no obvious difference between both of them basically td- was
buggy so I copied it into t- then fixed the bugs there.
2016-03-19 23:25:16 +01:00
pancake
0442a71fa8 Fix agc by only showing flagged nodes 2016-03-19 02:43:36 +01:00
pancake
efc215d587 Fix aap for static and make it work in debugger 2016-03-19 02:39:28 +01:00
pancake
5b7c9f5aad Implement pvj command 2016-03-19 02:26:28 +01:00
pancake
23d8f286bc Fix aap boundaries issue for static binaries 2016-03-18 19:23:56 +01:00
Adrien Garin
10de21de7e RBin: fix PE and ELF versioninfo
PE parser is now able to get the StringTable value even if the
wValueLength of the structure is incorrect.

Fix a regression with ELF versioninfo.
2016-03-18 18:35:05 +01:00
pancake
76fa5bddcf Add missing signature 2016-03-18 17:19:06 +01:00
pancake
446add902f Fix #4345 - Add scas{bwd} for x86.nz 2016-03-18 16:59:47 +01:00
Evan Shaw
db00a291a5 Prettier memory region printing 2016-03-18 13:55:26 +01:00
pancake
03c49f92af Avoid fixed size buffer in t 2016-03-18 13:50:33 +01:00
oddcoder
9a7ea1b3f1 fixing indentation 2016-03-18 13:44:24 +01:00
oddcoder
6b256183c2 fixing t- 2016-03-18 13:44:24 +01:00
oddcoder
9c8158d397 unused variable 2016-03-18 13:44:24 +01:00
oddcoder
0b4a7635a0 fixing t-* 2016-03-18 13:44:24 +01:00
oddcoder
09bc8f2eaf fixing tb 2016-03-18 13:44:24 +01:00
oddcoder
f71a8e66db Off by one error?
[0x00000000]> t int
Breakpoint 1, cmd_type (data=0x55555575c5c0 <r>, input=0x5555558598e1 " int") at cmd_type.c:82
82		RCore *core = (RCore*)data;
(gdb) n
84		switch (input[0]) {
	(gdb)
	197			const char *isenum = sdb_const_get
	(core->anal->sdb_types, input+2, 0);
	(gdb) p input + 2
	$1 = 0x5555558598e3 "nt"   <-- shouldn't be "int"
	}
2016-03-18 13:44:24 +01:00
Evan Shaw
2ad75b67ec Fix NES memory mirroring
The mirror lists were never actually allocated.
2016-03-18 13:43:43 +01:00
pancake
09aed6e525 Simplify ?T and fix load time 2016-03-18 13:39:45 +01:00
Darredevil
12e40a9249 Loading time for issue #3244 2016-03-18 12:34:17 +01:00
pancake
dc33b03011 Handle movk and movz in the arm64 assembler and pseudo disassembler 2016-03-17 17:26:08 +01:00
pancake
182db54e57 Fix off-by-one in p= 2016-03-17 13:04:50 +01:00
Evan Shaw
288763f69a Count hex digits as numbers in parse filter
Without this we chop off number operands as soon as a hex digit is seen.

Also fix and use a previously unused macro.
2016-03-17 11:13:30 +01:00
pancake
bab0eb62c8 Fix sdb leaks in elf versioninfo 2016-03-17 11:11:12 +01:00
Álvaro Felipe Melchor
7e5fd3d11f Fix versioninfo crashes elf 2016-03-16 18:10:49 +01:00
Adr1
ab5792d132 RBin: improving versioninfo
Store ELF versioninfo in Sdb.
Display VS_FIXEDFILEINFO for PE.
2016-03-16 18:10:49 +01:00
Dax89
b9c34953a1 PSX Plugin: Use capstone disassembler, look for strings in TEXT segment 2016-03-16 16:45:49 +01:00
pancake
84fc735501 Some enhancements for the MIPS ESIL emulation 2016-03-16 16:37:57 +01:00
pancake
cb119968dd Fix #4293 - Fix mips string reference detection with ESIL 2016-03-16 15:14:05 +01:00
Álvaro Felipe Melchor
43e5171cf7 remove eprintf message 2016-03-16 14:15:16 +01:00
pancake
b34b3c55e6 Fix build (missing dep for core) 2016-03-16 13:45:38 +01:00
pancake
b461e3989a Implement woE/woD to encrypt/decrypt with rc2/rc4/xor/blowfish/aes... 2016-03-16 13:33:50 +01:00
pancake
21bb24b7a4 Honor anal.strings in aae 2016-03-16 13:08:27 +01:00
pancake
ec895d787c Fix ROR/ROL ESIL expressions for x86-64 capstone 2016-03-16 12:51:26 +01:00
pancake
8f2c20ded6 Fix android build 2016-03-16 12:21:41 +01:00
Gabriel Corona
0ec1b47b7c Remove useless cast in anal_ppc_cs
It was necessary when the PPC imm field (in capstone) was a i32. It is
counterproductive, now that imm is a i64.
2016-03-16 10:39:25 +01:00
Evan Shaw
9f1ef0d721 Reduce OMF format false positives
While developing the SNES bin plugin, I noticed some SNES ROMs were wrongly
detected as OMF.

This commit adds two additional checks to check_bytes:

* Check that record size and string size in the first record agree with each other
* Check that the string in the first record is valid ASCII

Regression tests still pass.

This commit also fixes an assumption that the host is little endian.
2016-03-16 10:36:26 +01:00
easyhard
ddaa6dff07 Fix issue #4319 can not use regex sequence in rop 2016-03-15 18:14:43 +01:00
pancake
8a45a43a86 Initial import of the m68k.pseudo plugin 2016-03-15 12:29:53 +01:00
pancake
ae32acc5bc Add missing space after commas in m68k 2016-03-15 11:59:19 +01:00