mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-21 06:40:33 +00:00
* Fix entropy range 0-8 (Thanks Glyn)
- Use 0-255 in pZ * Fix symstall for pkgconfig
This commit is contained in:
parent
499576407e
commit
6d5b22c29c
2
Makefile
2
Makefile
@ -72,7 +72,7 @@ install: install-doc install-man
|
||||
|
||||
install-pkgconfig-symlink:
|
||||
@${INSTALL_DIR} ${PFX}/lib/pkgconfig
|
||||
cd pkgcfg ; for a in *.pc ; do ln -fs $$a ${DESTDIR}/${PREFIX}/lib/pkgconfig/$$a ; done
|
||||
cd pkgcfg ; for a in *.pc ; do ln -fs $${PWD}/$$a ${DESTDIR}/${PREFIX}/lib/pkgconfig/$$a ; done
|
||||
|
||||
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink
|
||||
cd libr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
||||
|
10
TODO
10
TODO
@ -5,8 +5,7 @@
|
||||
|
||||
|
||||
* If [0-9] keybindings in visual point to same address use same reference
|
||||
* Remove linestyle
|
||||
- lines are not removed..
|
||||
* Remove linestyle???
|
||||
* Move the content of libr/*/TODO here
|
||||
* Honor string metadata for asmsteps ('jk' in visual)
|
||||
* Dupped javasm bin/asm
|
||||
@ -22,17 +21,14 @@
|
||||
|
||||
pancake
|
||||
-------
|
||||
* idc2rdb !!! important
|
||||
* print format for libmagic
|
||||
* check search multiple keywords and signatures
|
||||
* Visual disassembly cursor does not displays on scr.color=0
|
||||
* if console width > X place comments there (ash)
|
||||
* Implement BLOCK in r_core_sysenv_begin|end ()
|
||||
* Fix iterators for r_macro (test only?)
|
||||
* print format for libmagic
|
||||
* search for antidebug/disasm tricks opcodes
|
||||
- allows to find interesting points to analyze
|
||||
* AES/RSA Key finding
|
||||
http://citp.princeton.edu/memory/code/ <- implement this stuff in r2
|
||||
|
||||
nibble
|
||||
------
|
||||
@ -112,6 +108,8 @@ earada
|
||||
|
||||
0.8: focus on debugger and UI
|
||||
=============================
|
||||
* AES/RSA Key finding
|
||||
http://citp.princeton.edu/memory/code/ <- implement this stuff in r2
|
||||
* Reimplement or fix the delta diffing in C - first we need to do it for ired..
|
||||
* add support for .a files (r_fs supports cpio and ar archives...)
|
||||
* Implement rap:// upload/download protocol commands (maybe just system() with rsc2+wget?
|
||||
|
@ -81,13 +81,12 @@ R_API char* r_anal_reflines_str(RAnal *anal, RAnalRefline *list, ut64 addr, int
|
||||
|
||||
if (addr == ref->to) dir = 1;
|
||||
else if (addr == ref->from) dir = 2;
|
||||
|
||||
// TODO: if dir==1
|
||||
if (addr == ref->to) {
|
||||
str = r_str_concat (str, (ref->from>ref->to)?".":"`");
|
||||
ch = '-';
|
||||
} else if (addr == ref->from) {
|
||||
str = r_str_concat (str, (ref->from>ref->to)?"`":".");
|
||||
str = r_str_concat (str, (ref->from>ref->to)?"`":",");
|
||||
ch = '=';
|
||||
} else if (ref->from < ref->to) { /* down */
|
||||
if (addr > ref->from && addr < ref->to) {
|
||||
|
@ -48,7 +48,7 @@ static int printzoomcallback(void *user, int mode, ut64 addr, ut8 *bufz, ut64 si
|
||||
ret++;
|
||||
break;
|
||||
case 'e': // entropy
|
||||
ret = (unsigned char) r_hash_entropy (bufz, size);
|
||||
ret = (unsigned char) (r_hash_entropy (bufz, size)*255)/8;
|
||||
break;
|
||||
case 'h': //head
|
||||
default:
|
||||
@ -500,7 +500,7 @@ strcpy (extra, pad);
|
||||
if (!r_anal_cc_update (core->anal, &cc, &analop)) {
|
||||
if (show_functions) {
|
||||
char *ccstr = r_anal_cc_to_string (core->anal, &cc);
|
||||
r_cons_printf ("\n%s%s ; %s", line, pre, ccstr);
|
||||
r_cons_printf ("\n%s%s ; %s", pre, refline, ccstr);
|
||||
free (ccstr);
|
||||
}
|
||||
r_anal_cc_reset (&cc);
|
||||
@ -2077,7 +2077,7 @@ static int cmd_print(void *data, const char *input) {
|
||||
" pt [len] print diferent timestamps\n"
|
||||
" pr [len] print N raw bytes\n"
|
||||
" pu [len] print N url encoded bytes\n"
|
||||
" pU [len] print N wide url encoded bytes\n",
|
||||
" pU [len] print N wide url encoded bytes\n"
|
||||
" px [len] hexdump of N bytes\n"
|
||||
" pZ [len] print zoom view\n");
|
||||
break;
|
||||
@ -3217,7 +3217,7 @@ static int cmd_search(void *data, const char *input) {
|
||||
r_cons_printf (
|
||||
"Usage: /[amx/] [arg]\n"
|
||||
" / foo ; search for string 'foo'\n"
|
||||
" /w foo ; search for wide string 'f\\0o\\0o'\n"
|
||||
" /w foo ; search for wide string 'f\\0o\\0o\\0'\n"
|
||||
" /e /E.F/i ; match regular expression\n"
|
||||
" /x ff0033 ; search for hex string\n"
|
||||
" /c jmp [esp] ; search for asm code (see search.asmstr)\n"
|
||||
|
@ -19,10 +19,10 @@ static double get_px(ut8 x, const ut8 *data, ut64 size) {
|
||||
|
||||
R_API double r_hash_entropy(const ut8 *data, ut64 size) {
|
||||
double h = 0, px, log2;
|
||||
unsigned char x;
|
||||
unsigned int x;
|
||||
|
||||
log2 = logf ((double)2);
|
||||
for (x = 0; x < 255; x++) {
|
||||
log2 = log ((double)2);
|
||||
for (x = 0; x <= 255; x++) {
|
||||
px = get_px (x, data, size);
|
||||
if (px > 0)
|
||||
h += -px * (log (px)/log2);
|
||||
|
@ -220,6 +220,7 @@ R_API void r_print_hexdump(RPrint *p, ut64 addr, const ut8 *buf, int len, int ba
|
||||
p->printf (" %c", hex[(i+k)%16]);
|
||||
if (i&1) p->printf (" ");
|
||||
}
|
||||
p->printf (" ");
|
||||
for (i=0; i<inc; i++)
|
||||
p->printf ("%c", hex[(i+k)%16]);
|
||||
p->printf ("\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user