1 #include "cmd_helps.h" 2 3 // root helps 4 5 const RCmdDescHelp system_help = { 6 .summary = "run given command as in system(3)", 7 }; 8 const RCmdDescHelp underscore_help = { 9 .summary = "Print last output", 10 }; 11 12 const RCmdDescHelp hash_help = { 13 .summary = "Hashbang to run an rlang script", 14 }; 15 16 const RCmdDescHelp alias_help = { 17 .summary = "Alias commands and strings", 18 }; 19 20 const RCmdDescHelp env_help = { 21 .summary = "get/set environment variable", 22 }; 23 24 const RCmdDescHelp tasks_help = { 25 .summary = "Manage tasks (WARNING: Experimental. Use with caution!)", 26 }; 27 28 const RCmdDescHelp macro_help = { 29 .summary = "manage scripting macros", 30 }; 31 32 const RCmdDescHelp pointer_help = { 33 .summary = "alias for 'env' command", 34 }; 35 36 const RCmdDescHelp stdin_help = { 37 .summary = "", 38 }; 39 40 const RCmdDescHelp interpret_help = { 41 .summary = "Define macro or load r2, cparse or rlang file", 42 }; 43 44 const RCmdDescHelp table_help = { 45 .summary = "Load, filter CSV and display in json, tables", 46 }; 47 48 const RCmdDescHelp search_help = { 49 .summary = "search for bytes, regexps, patterns, ..", 50 }; 51 52 const RCmdDescHelp rap_help = { 53 .summary = "connect with other instances of r2", 54 }; 55 56 const RCmdDescHelp help_help = { 57 .summary = "Help or evaluate math expression", 58 }; 59 60 const RCmdDescHelp rap_run_help = { 61 .summary = "alias for =!", 62 }; 63 64 const RCmdDescHelp zero_help = { 65 .summary = "alias for `s 0x...`", 66 }; 67 68 const RCmdDescHelp anal_help = { 69 .summary = "analysis commands", 70 }; 71 72 const RCmdDescHelp b_help = { 73 .summary = "display or change the block size", 74 }; 75 76 const RCmdDescHelp c_help = { 77 .summary = "compare block with given data", 78 }; 79 80 const RCmdDescHelp C_help = { 81 .summary = "code metadata (comments, format, hints, ..)", 82 }; 83 84 const RCmdDescHelp d_help = { 85 .summary = "debugger commands", 86 }; 87 88 const RCmdDescHelp e_help = { 89 .summary = "list/get/set config evaluable vars", 90 }; 91 92 const RCmdDescHelp f_help = { 93 .summary = "add flag at current address", 94 }; 95 96 const RCmdDescHelp g_help = { 97 .summary = "generate shellcodes with r_egg", 98 }; 99 100 const RCmdDescHelp i_help = { 101 .summary = "get info about opened file from r_bin", 102 }; 103 104 const RCmdDescHelp k_help = { 105 .summary = "run sdb-query", 106 }; 107 108 const RCmdDescHelp l_help = { 109 .summary = "list files and directories", 110 }; 111 112 const RCmdDescHelp j_help = { 113 .summary = "join the contents of the two files", 114 }; 115 116 const RCmdDescHelp h_help = { 117 .summary = "show the top n number of line in file", 118 }; 119 120 const RCmdDescHelp L_help = { 121 .summary = "list, unload, load r2 plugins", 122 }; 123 124 const RCmdDescHelp m_help = { 125 .summary = "mountpoints commands", 126 }; 127 128 const RCmdDescHelp o_help = { 129 .summary = "open file at optional address", 130 }; 131 132 const RCmdDescHelp p_help = { 133 .summary = "print commands", 134 }; 135 136 const RCmdDescHelp P_help = { 137 .summary = "project management utilities", 138 }; 139 140 const RCmdDescHelp q_help = { 141 .summary = "quit program with a return value", 142 }; 143 144 const RCmdDescHelp Q_help = { 145 .summary = "quick quit", 146 }; 147 148 const RCmdDescHelp colon_help = { 149 .summary = "long commands (experimental)", 150 }; 151 152 const RCmdDescHelp r_help = { 153 .summary = "resize file", 154 }; 155 156 const RCmdDescHelp s_help = { 157 .summary = "seek to address", 158 }; 159 160 const RCmdDescHelp t_help = { 161 .summary = "types, noreturn, signatures, C parser and more", 162 }; 163 164 const RCmdDescHelp T_help = { 165 .summary = "Text log utility (used to chat, sync, log, ...)", 166 }; 167 168 const RCmdDescHelp u_help = { 169 .summary = "uname/undo seek/write", 170 }; 171 172 const RCmdDescHelp pipein_help = { 173 .summary = "push escaped string into the RCons.readChar buffer", 174 }; 175 176 const RCmdDescHelp V_help = { 177 .summary = "enter visual mode", 178 }; 179 180 const RCmdDescHelp v_help = { 181 .summary = "enter visual panels mode", 182 }; 183 184 const RCmdDescHelp w_group_help = { 185 .summary = "write commands", 186 }; 187 188 const RCmdDescHelp w_help = { 189 .args_str = " <string>", 190 .summary = "write string", 191 }; 192 193 const RCmdDescHelp x_help = { 194 .summary = "alias for 'px' (print hexadecimal)", 195 }; 196 197 const RCmdDescHelp y_help = { 198 .summary = "Yank/paste bytes from/to memory", 199 }; 200 201 const RCmdDescHelp z_help = { 202 .summary = "zignatures management", 203 }; 204 205 // w0 helps 206 207 const RCmdDescHelp w0_help = { 208 .summary = "Write 'len' bytes with value 0x00", 209 .args_str = " [len]", 210 .description = "Fill len bytes starting from the current offset with the value 0.", 211 }; 212 213 // w[1248][+-] helps 214 215 const RCmdDescExample w_incdec_help_examples[] = { 216 { .example = "w1+", .comment = "Add 1 to the byte at the current offset." }, 217 { .example = "w2-", .comment = "Subtract 1 to the word at the current offset." }, 218 { .example = "w4+ 0xdeadbeef", .comment = "Add 0xdeadbeef to the dword at the current offset." }, 219 { .example = "w8- 10", .comment = "Subtract 10 to the qword at the current offset." }, 220 { 0 }, 221 }; 222 223 const RCmdDescHelp w_incdec_help = { 224 .summary = "increment/decrement byte,word..", 225 .args_str = " [n]", 226 .options = "<1248><+->", 227 }; 228 229 const RCmdDescHelp w1_incdec_help = { 230 .summary = "Increment/decrement a byte", 231 .options = "<+->", 232 .args_str = " [n]", 233 .description = "Increment/decrement a byte at the current offset by 1 or n, if specified", 234 .examples = w_incdec_help_examples, 235 }; 236 237 const RCmdDescHelp w1_inc_help = { 238 .summary = "Increment a byte", 239 .args_str = " [n]", 240 .description = "Increment a byte at the current offset by 1 or n, if specified", 241 .examples = w_incdec_help_examples, 242 }; 243 244 const RCmdDescHelp w1_dec_help = { 245 .summary = "Decrement a byte", 246 .args_str = " [n]", 247 .description = "Decrement a byte at the current offset by 1 or n, if specified", 248 .examples = w_incdec_help_examples, 249 }; 250 251 const RCmdDescHelp w2_incdec_help = { 252 .summary = "Increment/decrement a word", 253 .options = "<+->", 254 .args_str = " [n]", 255 .description = "Increment/decrement a word at the current offset by 1 or n, if specified", 256 .examples = w_incdec_help_examples, 257 }; 258 259 const RCmdDescHelp w2_inc_help = { 260 .summary = "Increment a word", 261 .args_str = " [n]", 262 .description = "Increment a word at the current offset by 1 or n, if specified", 263 .examples = w_incdec_help_examples, 264 }; 265 266 const RCmdDescHelp w2_dec_help = { 267 .summary = "Decrement a word", 268 .args_str = " [n]", 269 .description = "Decrement a word at the current offset by 1 or n, if specified", 270 .examples = w_incdec_help_examples, 271 }; 272 273 const RCmdDescHelp w4_incdec_help = { 274 .summary = "Increment/decrement a dword", 275 .options = "<+->", 276 .args_str = " [n]", 277 .description = "Increment/decrement a dword at the current offset by 1 or n, if specified", 278 .examples = w_incdec_help_examples, 279 }; 280 281 const RCmdDescHelp w4_inc_help = { 282 .summary = "Increment a dword", 283 .args_str = " [n]", 284 .description = "Increment a dword at the current offset by 1 or n, if specified", 285 .examples = w_incdec_help_examples, 286 }; 287 288 const RCmdDescHelp w4_dec_help = { 289 .summary = "Decrement a dword", 290 .args_str = " [n]", 291 .description = "Decrement a dword at the current offset by 1 or n, if specified", 292 .examples = w_incdec_help_examples, 293 }; 294 295 const RCmdDescHelp w8_incdec_help = { 296 .summary = "Increment/decrement a qword", 297 .options = "<+->", 298 .args_str = " [n]", 299 .description = "Increment/decrement a qword at the current offset by 1 or n, if specified", 300 .examples = w_incdec_help_examples, 301 }; 302 303 const RCmdDescHelp w8_inc_help = { 304 .summary = "Increment a qword", 305 .args_str = " [n]", 306 .description = "Increment a qword at the current offset by 1 or n, if specified", 307 .examples = w_incdec_help_examples, 308 }; 309 310 const RCmdDescHelp w8_dec_help = { 311 .summary = "Decrement a qword", 312 .args_str = " [n]", 313 .description = "Decrement a qword at the current offset by 1 or n, if specified", 314 .examples = w_incdec_help_examples, 315 }; 316 317 // wB helps 318 319 const RCmdDescExample wB_help_examples[] = { 320 { .example = "wB 0x20", .comment = "Sets the 5th bit at current offset, leaving all other bits intact." }, 321 { 0 }, 322 }; 323 324 const RCmdDescHelp wB_group_help = { 325 .args_str = " [value]", 326 .summary = "Set or unset bits with given value", 327 }; 328 329 const RCmdDescHelp wB_help = { 330 .summary = "Set bits with given value", 331 .args_str = " [value]", 332 .description = "Set the bits that are set in the value passed as arguments. 0 bits in the value argument are ignored, while the others are set at the current offset", 333 .examples = wB_help_examples, 334 }; 335 336 const RCmdDescHelp wB_minus_help = { 337 .summary = "Unset bits with given value", 338 .args_str = " [value]", 339 .description = "Unset the bits that are set in the value passed as arguments. 0 bits in the value argument are ignored, while the others are unset at the current offset" 340 }; 341 342 // wv helps 343 344 const RCmdDescExample wv_help_examples[] = { 345 { .example = "wv 0xdeadbeef", .comment = "Write the value 0xdeadbeef at current offset" }, 346 { 0 }, 347 }; 348 349 const RCmdDescHelp wv_group_help = { 350 .args_str = " [value]", 351 .summary = "Write value of given size", 352 }; 353 354 const RCmdDescHelp wv_help = { 355 .summary = "Write value as 4 - bytes / 8 - bytes based on value", 356 .args_str = " [value]", 357 .description = "Write the number passed as argument at the current offset as a 4 - bytes value or 8 - bytes value if the input is bigger than UT32_MAX, respecting the cfg.bigendian variable", 358 .examples = wv_help_examples, 359 }; 360 361 const RCmdDescHelp wv1_help = { 362 .summary = "Write value of 1 byte", 363 .args_str = " [value]", 364 .description = "Write the number passed as argument at the current offset as 1 - byte, respecting the cfg.bigendian variable", 365 }; 366 const RCmdDescHelp wv2_help = { 367 .summary = "Write value of 2 bytes", 368 .args_str = " [value]", 369 .description = "Write the number passed as argument at the current offset as 2 - bytes, respecting the cfg.bigendian variable", 370 }; 371 const RCmdDescHelp wv4_help = { 372 .summary = "Write value of 4 bytes", 373 .args_str = " [value]", 374 .description = "Write the number passed as argument at the current offset as 4 - bytes, respecting the cfg.bigendian variable", 375 }; 376 const RCmdDescHelp wv8_help = { 377 .summary = "Write value of 8 byte", 378 .args_str = " [value]", 379 .description = "Write the number passed as argument at the current offset as 8 - bytes, respecting the cfg.bigendian variable", 380 }; 381 382 const RCmdDescHelp w6_help = { 383 .args_str = " <base64>|<hexstring>", 384 .summary = "write base64 [d]ecoded or [e]ncoded string", 385 }; 386 387 const RCmdDescHelp wh_help = { 388 .args_str = " <command>", 389 .summary = "whereis/which shell command", 390 }; 391 392 const RCmdDescHelp we_help = { 393 .summary = "extend write operations (insert bytes instead of replacing)", 394 }; 395 396 const RCmdDescHelp wp_help = { 397 .args_str = " -|<file>", 398 .summary = "apply radare patch file. See wp? fmi", 399 }; 400 401 const RCmdDescHelp wu_help = { 402 .summary = "Apply unified hex patch (see output of cu)", 403 }; 404 405 const RCmdDescHelp wr_help = { 406 .args_str = " <num>", 407 .summary = "write <num> random bytes", 408 }; 409 410 const RCmdDescHelp wA_help = { 411 .args_str = " <type> <value>", 412 .summary = "alter/modify opcode at current seek (see wA?)", 413 }; 414 415 const RCmdDescHelp wc_help = { 416 .summary = "write cache commands", 417 }; 418 419 const RCmdDescHelp wz_help = { 420 .args_str = " <string>", 421 .summary = "write zero terminated string (like w + \x00)", 422 }; 423 424 const RCmdDescHelp wt_help = { 425 .summary = "write to file (from current seek, blocksize or sz bytes)", 426 }; 427 428 const RCmdDescHelp wf_help = { 429 .summary = "write data from file, socket, offset", 430 }; 431 432 const RCmdDescHelp ww_help = { 433 .args_str = " <string>", 434 .summary = "write wide string", 435 }; 436 437 const RCmdDescHelp wx_help = { 438 .args_str = " <hexstring>", 439 .summary = "write two intel nops (from wxfile or wxseek)", 440 }; 441 442 const RCmdDescHelp wa_help = { 443 .summary = "write opcode, separated by ';' (use '\"' around the command)", 444 }; 445 446 const RCmdDescHelp wb_help = { 447 .args_str = " <hexstring>", 448 .summary = "fill current block with cyclic hexstring", 449 }; 450 451 const RCmdDescHelp wm_help = { 452 .args_str = " <hexstring>", 453 .summary = "set binary mask hexpair to be used as cyclic write mask", 454 }; 455 456 const RCmdDescHelp wo_help = { 457 .summary = "write in block with operation. 'wo?' fmi", 458 }; 459 460 const RCmdDescHelp wd_help = { 461 .summary = "duplicate N bytes from offset at current seek (memcpy) (see y?)", 462 }; 463 464 const RCmdDescHelp ws_help = { 465 .summary = "write 1 byte for length and then the string", 466 }; 467