11160 Commits

Author SHA1 Message Date
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
b276795f1c Add r2 -r ? style output to rax2 2016-05-10 22:13:24 +02:00
Sven Steinbauer
97a8fe9657 Make graphviz config options clearer 2016-05-10 22:12:50 +02:00
Anton Kochkov
e804d5d124 Mention also -R option for rarun2 2016-05-10 18:14:00 +03:00
Maijin
0e801ae6e8 r2 -e dbg.profile=foo.rr2 -d ls 2016-05-10 17:04:53 +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
Damien Zammit
a68955c268 Fix rasm2 endian -e flag (#4824) 2016-05-09 15:24:01 +02:00
pancake
90e9ac8f69 Fix tcc build 2016-05-09 11:51:53 +02:00
pancake
d651283c57 Fix #4813 - Use dbg.map when in r2 -d 2016-05-09 11:35:52 +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
08127fdefa Update capstone to get an endian fix 2016-05-09 10:44:31 +02:00
pancake
7676272b18 Add sj and s= commands 2016-05-09 10:39:19 +02:00
Damien Zammit
351df0c2b7 Fix OSX build (#4810) 2016-05-09 09:52:54 +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
XVilka
f87859818a Fix build 2016-05-06 21:25:49 +03:00
XVilka
d77a47593f Improve Mingw32 building script 2016-05-06 21:09:23 +03: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