mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 05:09:43 +00:00
Fix #23538 - iS sha1,sha1/sort/inc table queries + entropy ##bin
Some checks are pending
build / linux-wasi (push) Waiting to run
build / linux-wasi-api (push) Waiting to run
build / linux-csnext (push) Waiting to run
build / linux-ssl-crypto (push) Waiting to run
build / tarball (push) Waiting to run
build / linux-static (push) Waiting to run
build / linux-acr-rpm-64 (push) Waiting to run
build / linux-acr-deb (amd64) (push) Waiting to run
build / linux-acr-deb (arm64, aarch64-linux-gnu) (push) Waiting to run
build / linux-acr-deb (i386, multilib) (push) Waiting to run
build / macos-acr (arm64, 13) (push) Waiting to run
build / macos-acr (x86_64, 12) (push) Waiting to run
build / ios (cydia32) (push) Waiting to run
build / ios (true, cydia) (push) Waiting to run
build / android-acr (16, arm) (push) Waiting to run
build / android-acr (aarch64) (push) Waiting to run
build / android-meson (x86_64) (push) Waiting to run
build / w32-meson (push) Waiting to run
build / w64-static-2022 (push) Waiting to run
build / w64-static (push) Waiting to run
build / w64-meson (push) Waiting to run
build / check_abi_compatibility (push) Blocked by required conditions
build / check_release (push) Blocked by required conditions
build / release (push) Blocked by required conditions
CI / linux-acr-oldlibsbug (push) Waiting to run
CI / linux-nocs (push) Waiting to run
CI / linux-acr-gperf (push) Waiting to run
CI / linux-sys-capstone (push) Waiting to run
CI / linux-acr-resymlink (push) Waiting to run
CI / linux-test (push) Waiting to run
CI / linux-static-meson (push) Waiting to run
CI / macos-test (push) Waiting to run
CI / linux-rpath (push) Waiting to run
CI / macos-rpath (push) Waiting to run
CI / linux-meson-spaces (push) Waiting to run
CI / linux-tinyasan-fuzz (push) Waiting to run
CI / linux-asan-fuzz (push) Waiting to run
CI / w64-make (push) Waiting to run
CI / w32-mingw (push) Waiting to run
CI / w64-mingw (push) Waiting to run
Code scanning - action / CodeQL-Build (push) Waiting to run
Coverity Scan / latest (push) Waiting to run
tcc / ubuntu-tcc-newabi (push) Waiting to run
tcc / ubuntu-tcc-test (push) Waiting to run
tcc / ubuntu-tcc-nodbg (push) Waiting to run
tcc / r2pm-tcc (push) Waiting to run
tcc / ubuntu-tcc-syslibs (push) Waiting to run
Some checks are pending
build / linux-wasi (push) Waiting to run
build / linux-wasi-api (push) Waiting to run
build / linux-csnext (push) Waiting to run
build / linux-ssl-crypto (push) Waiting to run
build / tarball (push) Waiting to run
build / linux-static (push) Waiting to run
build / linux-acr-rpm-64 (push) Waiting to run
build / linux-acr-deb (amd64) (push) Waiting to run
build / linux-acr-deb (arm64, aarch64-linux-gnu) (push) Waiting to run
build / linux-acr-deb (i386, multilib) (push) Waiting to run
build / macos-acr (arm64, 13) (push) Waiting to run
build / macos-acr (x86_64, 12) (push) Waiting to run
build / ios (cydia32) (push) Waiting to run
build / ios (true, cydia) (push) Waiting to run
build / android-acr (16, arm) (push) Waiting to run
build / android-acr (aarch64) (push) Waiting to run
build / android-meson (x86_64) (push) Waiting to run
build / w32-meson (push) Waiting to run
build / w64-static-2022 (push) Waiting to run
build / w64-static (push) Waiting to run
build / w64-meson (push) Waiting to run
build / check_abi_compatibility (push) Blocked by required conditions
build / check_release (push) Blocked by required conditions
build / release (push) Blocked by required conditions
CI / linux-acr-oldlibsbug (push) Waiting to run
CI / linux-nocs (push) Waiting to run
CI / linux-acr-gperf (push) Waiting to run
CI / linux-sys-capstone (push) Waiting to run
CI / linux-acr-resymlink (push) Waiting to run
CI / linux-test (push) Waiting to run
CI / linux-static-meson (push) Waiting to run
CI / macos-test (push) Waiting to run
CI / linux-rpath (push) Waiting to run
CI / macos-rpath (push) Waiting to run
CI / linux-meson-spaces (push) Waiting to run
CI / linux-tinyasan-fuzz (push) Waiting to run
CI / linux-asan-fuzz (push) Waiting to run
CI / w64-make (push) Waiting to run
CI / w32-mingw (push) Waiting to run
CI / w64-mingw (push) Waiting to run
Code scanning - action / CodeQL-Build (push) Waiting to run
Coverity Scan / latest (push) Waiting to run
tcc / ubuntu-tcc-newabi (push) Waiting to run
tcc / ubuntu-tcc-test (push) Waiting to run
tcc / ubuntu-tcc-nodbg (push) Waiting to run
tcc / r2pm-tcc (push) Waiting to run
tcc / ubuntu-tcc-syslibs (push) Waiting to run
This commit is contained in:
parent
f4b0117b9f
commit
c9aaba785b
@ -3062,6 +3062,7 @@ static bool bin_sections(RCore *r, PJ *pj, int mode, ut64 laddr, int va, ut64 at
|
|||||||
} else if (IS_MODE_RAD (mode) && at == UT64_MAX) {
|
} else if (IS_MODE_RAD (mode) && at == UT64_MAX) {
|
||||||
r_cons_printf ("fs %ss\n", type);
|
r_cons_printf ("fs %ss\n", type);
|
||||||
} else if (IS_MODE_NORMAL (mode) && at == UT64_MAX && !printHere) {
|
} else if (IS_MODE_NORMAL (mode) && at == UT64_MAX && !printHere) {
|
||||||
|
// R2_600 - remove this [Sections] header
|
||||||
r_cons_printf ("[%s]\n", print_segments ? "Segments" : "Sections");
|
r_cons_printf ("[%s]\n", print_segments ? "Segments" : "Sections");
|
||||||
} else if (IS_MODE_NORMAL (mode) && printHere) {
|
} else if (IS_MODE_NORMAL (mode) && printHere) {
|
||||||
r_cons_printf ("Current section\n");
|
r_cons_printf ("Current section\n");
|
||||||
|
@ -1472,12 +1472,6 @@ static void cmd_iS(RCore *core, const char *input, PJ **_pj, int mode, const boo
|
|||||||
}
|
}
|
||||||
if (!input[1]) {
|
if (!input[1]) {
|
||||||
RBININFO ("sections", R_CORE_BIN_ACC_SECTIONS, NULL, 0);
|
RBININFO ("sections", R_CORE_BIN_ACC_SECTIONS, NULL, 0);
|
||||||
} else if (input[1] == ',' || input[1] == ' ') {
|
|
||||||
R_FREE (core->table_query);
|
|
||||||
core->table_query = strdup (input + 2);
|
|
||||||
RBinObject *obj = r_bin_cur_object (core->bin);
|
|
||||||
int count = (obj && obj->sections)? r_list_length (obj->sections): 0;
|
|
||||||
RBININFO ("sections", R_CORE_BIN_ACC_SECTIONS, input + 1, count);
|
|
||||||
} else if (input[1] == 'S' && !input[2]) { // "iSS"
|
} else if (input[1] == 'S' && !input[2]) { // "iSS"
|
||||||
RBININFO ("segments", R_CORE_BIN_ACC_SEGMENTS, NULL, 0);
|
RBININFO ("segments", R_CORE_BIN_ACC_SEGMENTS, NULL, 0);
|
||||||
} else { // iS/iSS entropy,sha1
|
} else { // iS/iSS entropy,sha1
|
||||||
@ -1487,13 +1481,18 @@ static void cmd_iS(RCore *core, const char *input, PJ **_pj, int mode, const boo
|
|||||||
if (input[1] == 'S') {
|
if (input[1] == 'S') {
|
||||||
name = "segments";
|
name = "segments";
|
||||||
input++;
|
input++;
|
||||||
if (input[1] == ',') {
|
|
||||||
R_FREE (core->table_query);
|
|
||||||
core->table_query = strdup (input + 2);
|
|
||||||
}
|
|
||||||
action = R_CORE_BIN_ACC_SEGMENTS;
|
action = R_CORE_BIN_ACC_SEGMENTS;
|
||||||
}
|
}
|
||||||
switch (input[1]) {
|
char input0 = input[1];
|
||||||
|
if (*input == ' ') {
|
||||||
|
input ++;
|
||||||
|
}
|
||||||
|
const char *comma = strchr (input, ',');
|
||||||
|
if (comma) {
|
||||||
|
R_FREE (core->table_query);
|
||||||
|
core->table_query = strdup (comma + 1);
|
||||||
|
}
|
||||||
|
switch (input0) {
|
||||||
case '=': // "iS="
|
case '=': // "iS="
|
||||||
mode = R_MODE_EQUAL;
|
mode = R_MODE_EQUAL;
|
||||||
break;
|
break;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
NAME=iS query
|
NAME=iS query
|
||||||
FILE=bins/elf/analysis/main
|
FILE=bins/elf/analysis/main
|
||||||
CMDS=iS size/sort,vaddr/cols/name
|
CMDS=iS,size/sort,vaddr/cols/name
|
||||||
EXPECT=<<EOF
|
EXPECT=<<EOF
|
||||||
[Sections]
|
[Sections]
|
||||||
|
|
||||||
|
@ -730,22 +730,22 @@ colu: 12
|
|||||||
addr: 0x00001149
|
addr: 0x00001149
|
||||||
EOF
|
EOF
|
||||||
EXPECT_ERR=<<EOF
|
EXPECT_ERR=<<EOF
|
||||||
DEBUG: [cbin.c:3352] (section .dynsym) Cd 8[21] @ 0x3d8
|
DEBUG: [cbin.c:3353] (section .dynsym) Cd 8[21] @ 0x3d8
|
||||||
DEBUG: [cbin.c:3352] (section .dynstr) Css 141 @ 0x480
|
DEBUG: [cbin.c:3353] (section .dynstr) Css 141 @ 0x480
|
||||||
DEBUG: [cbin.c:3352] (section .rela.dyn) Cd 8[24] @ 0x550
|
DEBUG: [cbin.c:3353] (section .rela.dyn) Cd 8[24] @ 0x550
|
||||||
DEBUG: [cbin.c:3352] (section .rela.plt) Cd 8[3] @ 0x610
|
DEBUG: [cbin.c:3353] (section .rela.plt) Cd 8[3] @ 0x610
|
||||||
DEBUG: [cbin.c:3352] (section .init_array) Cd 8[1] @ 0x3db8
|
DEBUG: [cbin.c:3353] (section .init_array) Cd 8[1] @ 0x3db8
|
||||||
DEBUG: [cbin.c:3352] (section .fini_array) Cd 8[1] @ 0x3dc0
|
DEBUG: [cbin.c:3353] (section .fini_array) Cd 8[1] @ 0x3dc0
|
||||||
DEBUG: [cbin.c:3352] (section .dynamic) Cd 8[62] @ 0x3dc8
|
DEBUG: [cbin.c:3353] (section .dynamic) Cd 8[62] @ 0x3dc8
|
||||||
DEBUG: [cbin.c:3352] (section .got) Cd 8[9] @ 0x3fb8
|
DEBUG: [cbin.c:3353] (section .got) Cd 8[9] @ 0x3fb8
|
||||||
DEBUG: [cbin.c:3352] (section .dynsym) Cd 8[21] @ 0x3d8
|
DEBUG: [cbin.c:3353] (section .dynsym) Cd 8[21] @ 0x3d8
|
||||||
DEBUG: [cbin.c:3352] (section .dynstr) Css 141 @ 0x480
|
DEBUG: [cbin.c:3353] (section .dynstr) Css 141 @ 0x480
|
||||||
DEBUG: [cbin.c:3352] (section .rela.dyn) Cd 8[24] @ 0x550
|
DEBUG: [cbin.c:3353] (section .rela.dyn) Cd 8[24] @ 0x550
|
||||||
DEBUG: [cbin.c:3352] (section .rela.plt) Cd 8[3] @ 0x610
|
DEBUG: [cbin.c:3353] (section .rela.plt) Cd 8[3] @ 0x610
|
||||||
DEBUG: [cbin.c:3352] (section .init_array) Cd 8[1] @ 0x3db8
|
DEBUG: [cbin.c:3353] (section .init_array) Cd 8[1] @ 0x3db8
|
||||||
DEBUG: [cbin.c:3352] (section .fini_array) Cd 8[1] @ 0x3dc0
|
DEBUG: [cbin.c:3353] (section .fini_array) Cd 8[1] @ 0x3dc0
|
||||||
DEBUG: [cbin.c:3352] (section .dynamic) Cd 8[62] @ 0x3dc8
|
DEBUG: [cbin.c:3353] (section .dynamic) Cd 8[62] @ 0x3dc8
|
||||||
DEBUG: [cbin.c:3352] (section .got) Cd 8[9] @ 0x3fb8
|
DEBUG: [cbin.c:3353] (section .got) Cd 8[9] @ 0x3fb8
|
||||||
WARN: [cbin.c:1899] Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
|
WARN: [cbin.c:1899] Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
|
||||||
DEBUG: [cbin.c:2593] Cannot resolve symbol address __libc_start_main
|
DEBUG: [cbin.c:2593] Cannot resolve symbol address __libc_start_main
|
||||||
DEBUG: [cbin.c:2593] Cannot resolve symbol address _ITM_deregisterTMCloneTable
|
DEBUG: [cbin.c:2593] Cannot resolve symbol address _ITM_deregisterTMCloneTable
|
||||||
|
Loading…
Reference in New Issue
Block a user