mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 03:11:28 +00:00
Implement @@@strings iterator ##core
This commit is contained in:
parent
9e9eac5171
commit
b176a9fb1b
@ -3401,7 +3401,21 @@ R_API int r_core_cmd_foreach3(RCore *core, const char *cmd, char *each) { // "@@
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
{
|
if (each[1] == 't') { // strings
|
||||||
|
list = r_bin_get_strings (core->bin);
|
||||||
|
RBinString *s;
|
||||||
|
if (list) {
|
||||||
|
ut64 offorig = core->offset;
|
||||||
|
ut64 obs = core->blocksize;
|
||||||
|
r_list_foreach (list, iter, s) {
|
||||||
|
r_core_block_size (core, s->size);
|
||||||
|
r_core_seek (core, s->vaddr, 1);
|
||||||
|
r_core_cmd0 (core, cmd);
|
||||||
|
}
|
||||||
|
r_core_block_size (core, obs);
|
||||||
|
r_core_seek (core, offorig, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// symbols
|
// symbols
|
||||||
RBinSymbol *sym;
|
RBinSymbol *sym;
|
||||||
ut64 offorig = core->offset;
|
ut64 offorig = core->offset;
|
||||||
|
@ -160,6 +160,7 @@ static const char *help_msg_at_at_at[] = {
|
|||||||
"x", " @@@i", "imports",
|
"x", " @@@i", "imports",
|
||||||
"x", " @@@r", "registers",
|
"x", " @@@r", "registers",
|
||||||
"x", " @@@s", "symbols",
|
"x", " @@@s", "symbols",
|
||||||
|
"x", " @@@st", "strings",
|
||||||
"x", " @@@S", "sections",
|
"x", " @@@S", "sections",
|
||||||
"x", " @@@m", "io.maps",
|
"x", " @@@m", "io.maps",
|
||||||
"x", " @@@M", "dbg.maps (See ?$?~size)",
|
"x", " @@@M", "dbg.maps (See ?$?~size)",
|
||||||
|
Loading…
Reference in New Issue
Block a user