Commit Graph

4552 Commits

Author SHA1 Message Date
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
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
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
c74b476464 Fix tk fflush issue for /t webui 2016-03-27 17:20:21 +02:00
pancake
365162d4a8 Run file.analyze only when file contains entrypoint 2016-03-27 14:05:43 +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
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
Álvaro Felipe Melchor
2cf64fbb8a fix memory leak 2016-03-25 00:25:26 +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
HummyPkg
cbedd8fd33 Put esil discovered strings into strings flagspace 2016-03-24 12:46:21 +01:00
pancake
bf904374ef Enhance icj 2016-03-24 00:41:56 +01:00
pancake
90bc56dc43 Implement variable to get minimum map address 2016-03-23 22:42:02 +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
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
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
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
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
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
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
Adr1
ab5792d132 RBin: improving versioninfo
Store ELF versioninfo in Sdb.
Display VS_FIXEDFILEINFO for PE.
2016-03-16 18:10: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
easyhard
ddaa6dff07 Fix issue #4319 can not use regex sequence in rop 2016-03-15 18:14:43 +01:00
pancake
15d9563014 Fix #4313 - & in function switches fcn->bits instead of global ones 2016-03-15 11:47:13 +01:00
pancake
b0f887edd9 Add tiny warning for anal.calls 2016-03-15 11:28:56 +01:00
easyhard
91cc270fbf only try smaller addresses in non-align arch 2016-03-14 23:08:26 +01:00
easyhard
312f72ac01 Fix #4020 - ROP: Find gadgets from all offsets
End gadgat instruction may be part of a different
isntruction, depends on starting offset. Therefore,
rop searching should try some starting offsets that
are smaller than the previous end gadgat.
2016-03-14 23:08:26 +01:00
oddcoder
f5f28caa14 fixing little error in the description 2016-03-14 23:04:18 +01:00
oddcoder
021b9950db fixing a bug in eco
eco just freezes when requesting doc by the command `eco?`
2016-03-14 23:04:18 +01:00
pancake
e4e9b01728 Add anal.strings false by default and enhance string detection 2016-03-14 09:42:54 +01:00
pancake
185207cc1c Fix #4305 - aar detect and define strings 2016-03-14 01:45:25 +01:00
pancake
6d204b1bc3 Fix another whitespace issue in pd 2016-03-14 00:15:51 +01:00
pancake
b80904319d Fix #4194 - Remove RCons dependency from RIO 2016-03-14 00:11:31 +01:00
pancake
23b3c5fe30 Fix #4290 - @@@ was not documented 2016-03-14 00:01:39 +01:00
pancake
1b1e722795 Workaround for 6502 to show 16bit PC register 2016-03-13 23:56:23 +01:00
pancake
ad2df38fca Fix onespace issue in pd 2016-03-13 21:56:46 +01:00
pancake
bd11cf8f81 Fix pd regression with spaces at the end 2016-03-13 03:13:27 +01:00
pancake
21fecbaf87 Some more p= fixes 2016-03-13 02:31:13 +01:00
pancake
fd5c8d17fe Refactor the p=X, honor current seek and better ascii bars 2016-03-13 01:30:28 +01:00
Maijin
daafa94407 Enable demangle by default fix #4266 2016-03-12 18:01:12 +01:00
Maijin
38bc88fb67 Also add the warning in aaa 2016-03-12 17:48:53 +01:00
Álvaro Felipe Melchor
1828d76dcf Add missing type iej 2016-03-12 13:09:23 +01:00
Álvaro Felipe Melchor
1f2139fd54 Fix null dereference 2016-03-12 13:09:19 +01:00
pancake
0104b0b324 Show checksum info in rabin2 -I, need better naming 2016-03-12 11:28:05 +01:00
Aneesh Dogra
5c3f5904ea Add a way to compare claimed CRC (in header) of PE files with the actual CRC. 2016-03-12 11:22:55 +01:00
pancake
977aeb8173 Show entrypoint type info in rabin2 -e and ie 2016-03-12 11:16:42 +01:00
pancake
4fc392eefa Remove dead code 2016-03-12 02:36:37 +01:00
pancake
04a5eb3fb4 Fix #4292 - JSON and quiet modes for p=[pe] 2016-03-11 12:19:37 +01:00
pancake
e68b5f2463 Do not print ao's type2 if it's null 2016-03-11 09:50:36 +01:00
Jeffrey Crowell
3511c9198f refix pdfj 2016-03-10 11:34:21 -05:00
Aneesh Dogra
c7867da944 versioninfo: Fix SEGV on files with no info (.txt, ...) 2016-03-10 16:40:21 +01:00
Riccardo Schirone
8fa47870b2 core/disasm: at should not depend on i, that is used as index for buf
"i" was reset to 0 when the buffer is moved, so "at" pointed back to an
already printed instruction. With this patch "at" is calculated based on
"k", a new index that is never reset and simply indicates the delta from
the starting address.
2016-03-09 12:24:10 +01:00
Elia Geretto
5f3d9d4899 Sort afl output by offset 2016-03-09 11:52:22 +01:00
pancake
342961a3c5 Fix #4251 - Blank space using fcnlines=0 and flgoff=1 2016-03-09 10:08:53 +01:00
pancake
bb5d4d7b56 Fix #4261 - duplicated offset with asm.spacy 2016-03-09 09:53:53 +01:00
pancake
bfdde3f565 Remove flag listing issues with asm.functions=false 2016-03-09 09:50:30 +01:00
Maijin
f728ed6bc3 Add command name in aaaa
Add command name in aaaa
2016-03-08 09:05:01 +01:00
pancake
588e264f9f Fix latest COVs 2016-03-07 12:54:40 +01:00
pancake
75bf9b233a Fix aat->aap typo and add no-mclass option for x86.arm.cs 2016-03-07 12:31:50 +01:00
pancake
2c049ad05e Better aaaa reports 2016-03-07 04:12:11 +01:00
pancake
377ff92134 Fix #4190 - Scroll below 0 in cursor mode not jumping to -1 2016-03-07 03:35:13 +01:00
pancake
b2bb2ff78c Fix #4235 - oob read in aaf 2016-03-07 01:01:05 +01:00
pancake
3c6cd37ba9 Fix #4243 - Stack overflow in aae 2016-03-07 00:18:06 +01:00
pancake
0f4239cf71 Fix oob read in afe 2016-03-06 23:31:21 +01:00
pancake
1f1813dd45 Aim to fix #4231 - Segfault in cursor+fold 2016-03-06 23:23:39 +01:00
Matthieu Tardy
bb84bbc276 Fix memory leaks in rabin2 and libr 2016-03-06 23:17:44 +01:00
Álvaro Felipe Melchor
ee988122de fix oob read when doing aae 2016-03-06 23:15:42 +01:00
Maijin
fbb1b1e80f Adding verbosity in aaa 2016-03-06 19:38:25 +01:00
pancake
9c05579ade Add ecn and use it from VR with scr.randpal 2016-03-06 12:35:07 +01:00
pancake
92ad561fea Fix latest coverities 2016-03-05 20:46:04 +01:00
Riccardo Schirone
48fb9e14e0 core/visual: fix 'J' and 'K' when screen is full of flags/comments/etc. 2016-03-04 13:46:10 +01:00
Adr1
611c3d1752 RBin: Display File Version info 2016-03-04 01:15:56 +01:00
pancake
6ed05a7812 Fix pd regression 2016-03-04 01:15:20 +01:00
pancake
ec3ee44ae0 Implement asm.flgoff and asm.spacy + minor optimization 2016-03-04 00:33:24 +01:00
pancake
7a1993b057 Fix str_case regression 2016-03-03 11:45:04 +01:00
pancake
ec41dca741 Fix lowercase sdb filenames for DLL import resolution 2016-03-03 11:03:14 +01:00
Riccardo Schirone
ec6b55527c core/disasm: fix set of last row offset
core/visual: reset cursor position on 'u'/'U'/'o'/'V'.
2016-03-02 11:29:13 +01:00
pancake
3533813995 Fix #4190 - Scrolling beyond zero 2016-02-29 15:55:25 +01:00
Riccardo Schirone
64c3c9a723 core/graph: disable cursor when in graph mode to avoid glitches 2016-02-28 14:19:57 +01:00
Martin Heistermann
fbd0905c56 Add initial indirect relocation (irel, ifunc) support. 2016-02-28 02:43:25 +01:00
pancake
a22258e99a Better error message for dbg.bpinmaps 2016-02-28 02:43:13 +01:00
pancake
35af84c978 Implement pxd[#] for signed num dumps 2016-02-27 18:36:28 +01:00
pancake
0f21114112 Initial implementation of ?vi[1248] to compute signed integer values 2016-02-27 17:58:32 +01:00
pancake
09117ca99b Fix Cov CID 1352280 2016-02-27 12:38:02 +01:00
pancake
1f994eec76 Fix #4182 - ignore asm.tabs in pdc 2016-02-26 14:39:53 +01:00
pancake
517f7fa23e Handle Vi in Vppc - aka change reg values with cursor 2016-02-25 11:35:59 +01:00
pancake
eef4665242 Initial support for tab in visual debugger 2016-02-25 10:28:54 +01:00
pancake
a7f137f215 Support cursor in dr= 2016-02-25 02:58:26 +01:00
Riccardo Schirone
a87a77f9e4 core/disasm: asm.bbline should be based on RAnal
The BasicBlock is a concept you can have only with analysis info. This
ensure that the displayed result is correct.
2016-02-24 23:00:41 +01:00
Riccardo Schirone
e727e662db core/disasm: fix bbline reflines 2016-02-24 23:00:41 +01:00
Mario Ballano
47d9888f93 Various RAP client/server bugs, endianness and remove RAP_RMT_SYSTEM 2016-02-23 15:00:59 +01:00
Riccardo Schirone
dddb490969 core/anal: give better names to function when they have symbols 2016-02-23 14:21:41 +01:00
Riccardo Schirone
28f3561512 core/vmenus: add 'Vdn' option to rename flags/vars in current inst 2016-02-23 02:35:47 +01:00
pancake
c2f5b72c80 Fix #4010 - axg: show recursive xrefs tree 2016-02-23 02:31:53 +01:00
pancake
607491e1ce More fixes for pd@x:90 variants. New tests in r2r 2016-02-22 23:53:29 +01:00
pancake
8d60ef61dc Fix #4110 - Fix pd@x:90 issue 2016-02-22 23:45:36 +01:00