rabin2 -V -> -p (-p is more meaningful to show physical addresses)

This commit is contained in:
pancake 2014-08-24 10:41:32 +02:00
parent 443447e3ce
commit 00245e5e96
4 changed files with 11 additions and 11 deletions

View File

@ -70,13 +70,13 @@ static int rabin_show_help(int v) {
" -N [minlen] force minimum number of chars per string (see -z)\n"
" -o [str] output file/folder for write operations (out by default)\n"
" -O [str] write/extract operations (-O help)\n"
" -p show physical addresses\n"
" -q be quiet, just show fewer data\n"
" -r radare output\n"
" -R relocations\n"
" -s symbols (exports)\n"
" -S sections\n"
" -v display version and quit\n"
" -V disable va. show physical addresses\n"
//" -V show version information\n"
" -x extract bins contained in file\n"
" -z strings (from data section)\n"
@ -373,7 +373,7 @@ int main(int argc, char **argv) {
#define is_active(x) (action&x)
#define set_action(x) actions++; action |=x
while ((c = getopt (argc, argv, "jgqAf:a:B:b:c:Ck:K:dMm:n:N:@:isSIHelRwO:o:rvLhxzZV")) != -1) {
while ((c = getopt (argc, argv, "jgqAf:a:B:b:c:Ck:K:dMm:n:N:@:isSIHelRwO:o:prvLhxzZ")) != -1) {
switch (c) {
case 'g':
set_action (ACTION_CLASSES);
@ -449,8 +449,8 @@ int main(int argc, char **argv) {
}
break;
case 'o': output = optarg; break;
case 'p': va = R_FALSE; break;
case 'r': rad = R_TRUE; break;
case 'V': va = R_FALSE; break;
case 'v': return blob_version ("rabin2");
case 'L': r_bin_list (bin); return 1;
case 'B':

View File

@ -9,7 +9,7 @@ static int r_core_bin_set_cur (RCore *core, RBinFile *binfile);
static ut64 rva (RBin *bin, int va, ut64 paddr, ut64 vaddr, ut64 baddr, ut64 laddr) {
switch (va) {
case 0: // pa $ rabin2 -V
case 0: // pa $ rabin2 -p
return paddr;
case 1: // va $ rabin2
return r_bin_get_vaddr (bin, baddr, paddr, vaddr);

View File

@ -130,7 +130,7 @@ R_API void r_core_sysenv_help(const RCore* core) {
"!", "ls", "execute 'ls' in shell",
"!!", "", "save command history to hist file",
"!!", "ls~txt", "print output of 'ls' and grep for 'txt'",
".!", "rabin2 -rVsei ${FILE}", "run each output line as a r2 cmd",
".!", "rabin2 -rpsei ${FILE}", "run each output line as a r2 cmd",
"!", "echo $SIZE", "display file size",
"\nEnvironment:", "", "",
"FILE", "", "file name",

View File

@ -5,7 +5,7 @@ rabin2 \- Binary program info extractor
.Pp
.Sh SYNOPSIS
.Nm rabin2
.Op Fl ACeigsSMzIHlRrLxvVh
.Op Fl ACeghHiIsSMzlpRrLxvh
.Op Fl a Ar arch
.Op Fl b Ar bits
.Op Fl B Ar addr
@ -70,10 +70,12 @@ Show source line reference from a given address
Force minimum number of chars per string (see -z)
.It Fl n Ar str
Show information (symbol, section, import) at string offset
.It Fl O Ar str
Write/extract operations (\-O help)
.It Fl o Ar str
Output file/folder for write operations (out by default)
.It Fl O Ar str
Write/extract operations (\-O help)
.It Fl p
Disable VA. Show physical addresses
.It Fl q
Be quiet, just show fewer data
.It Fl R
@ -84,8 +86,6 @@ Show output in radare format
Show exported symbols
.It Fl S
Show sections
.It Fl V
Disable VA. Show physical addresses
.It Fl v
Show version information
.It Fl x
@ -114,7 +114,7 @@ Get entrypoint
Load symbols and imports from radare2
.Pp
$ r2 -n /bin/ls
[0x00000000]> .!rabin2 \-Vrsi $FILE
[0x00000000]> .!rabin2 \-prsi $FILE
.Sh SEE ALSO
.Pp
.Xr rahash2(1) ,