💾 Archived View for radare.org › book › search_bytes › automation.gmi captured on 2024-05-10 at 11:00:13. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-11-04)
-=-=-=-=-=-=-
The `cmd.hit` configuration variable is used to define a radare2 command to be executed when a matching entry is found by the search engine. If you want to run several commands, separate them with `;`. Alternatively, you can arrange them in a separate script, and then invoke it as a whole with `. script-file-name` command.
For example: ``` [0x00404888]> e cmd.hit = p8 8 [0x00404888]> / lib Searching 3 bytes from 0x00400000 to 0x0041ae08: 6c 69 62 hits: 9 0x00400239 hit4_0 "lib64/ld-linux-x86-64.so.2" 31ed4989d15e4889 0x00400f19 hit4_1 "libselinux.so.1" 31ed4989d15e4889 0x00400fae hit4_2 "librt.so.1" 31ed4989d15e4889 0x00400fc7 hit4_3 "libacl.so.1" 31ed4989d15e4889 0x00401004 hit4_4 "libc.so.6" 31ed4989d15e4889 0x004013ce hit4_5 "libc_start_main" 31ed4989d15e4889 0x00416542 hit4_6 "libs/" 31ed4989d15e4889 0x00417160 hit4_7 "lib/xstrtol.c" 31ed4989d15e4889 0x00417578 hit4_8 "lib" 31ed4989d15e4889 ```