From 729edc8919adb0227bc5fba67ffcef514cb4cf84 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 25 Sep 2023 10:34:12 +0800 Subject: [PATCH] Edit `w?` (#3884) --- doc/rzshell.md | 8 ++++---- librz/core/cmd_descs/cmd_descs.c | 12 ++++++------ librz/core/cmd_descs/cmd_write.yaml | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/rzshell.md b/doc/rzshell.md index 7f95cfb48f..9519145425 100644 --- a/doc/rzshell.md +++ b/doc/rzshell.md @@ -176,7 +176,7 @@ Usage: w[?] # Write commands | wB[-] # Set or unset bits with given value | wv[1248] # Write value of given size | w0 # Write bytes with value 0x00 -| w<1248><+-> [] # increment/decrement byte, word, .. +| w<1248><+-> [] # Increment/decrement byte, word, ... | w6 # Write base64 [d]ecoded or [e]ncoded string | we # Extend write operations (insert bytes instead of replacing) | wu # Apply unified hex patch (see output of cu) @@ -184,13 +184,13 @@ Usage: w[?] # Write commands | wc[j*-+ip?] # Write cache commands | wz # Write zero-terminated string | wf[xfs] # Write data from file, socket, offset -| ww # Write wide 16 little endian string +| ww # Write wide (16-bit) little-endian string | wx[f] # Write hexadecimal data | wa[ifo] # Write opcodes -| wb # Write in current block an hexstring cyclically +| wb # Write in current block a hexstring cyclically | wm[-] # Set binary mask hexpair to be used as cyclic write mask | wo # Write a block with a special operation -| wD[/] # Write De Bruijn Pattern +| wD[/] # Write de Bruijn pattern | wd # Duplicate bytes from offset to current seek | ws # Write 1 byte for length and then the string ``` diff --git a/librz/core/cmd_descs/cmd_descs.c b/librz/core/cmd_descs/cmd_descs.c index 0e9cfd9e8c..cf8c8b8726 100644 --- a/librz/core/cmd_descs/cmd_descs.c +++ b/librz/core/cmd_descs/cmd_descs.c @@ -16823,7 +16823,7 @@ static const RzCmdDescHelp write_zero_help = { }; static const RzCmdDescHelp write_incdec_help = { - .summary = "increment/decrement byte, word, ..", + .summary = "Increment/decrement byte, word, ...", .args_str = " []", .options = "<1248><+->", }; @@ -17353,7 +17353,7 @@ static const RzCmdDescArg write_wide_string_args[] = { { 0 }, }; static const RzCmdDescHelp write_wide_string_help = { - .summary = "Write wide 16 little endian string", + .summary = "Write wide (16-bit) little-endian string", .args = write_wide_string_args, }; @@ -17476,7 +17476,7 @@ static const RzCmdDescArg write_block_args[] = { { 0 }, }; static const RzCmdDescHelp write_block_help = { - .summary = "Write in current block an hexstring cyclically", + .summary = "Write in current block a hexstring cyclically", .args = write_block_args, }; @@ -17764,7 +17764,7 @@ static const RzCmdDescHelp write_op_encrypt_help = { }; static const RzCmdDescHelp wD_help = { - .summary = "Write De Bruijn Pattern", + .summary = "Write de Bruijn pattern", }; static const RzCmdDescArg write_debruijn_args[] = { { @@ -17776,7 +17776,7 @@ static const RzCmdDescArg write_debruijn_args[] = { { 0 }, }; static const RzCmdDescHelp write_debruijn_help = { - .summary = "Write a De Bruijn Pattern of length at the current offset", + .summary = "Write a de Bruijn pattern of length at the current offset", .args = write_debruijn_args, }; @@ -17790,7 +17790,7 @@ static const RzCmdDescArg write_debruijn_find_args[] = { { 0 }, }; static const RzCmdDescHelp write_debruijn_find_help = { - .summary = "Returns the offset where can be found in a De Bruijn Pattern", + .summary = "Returns the offset where can be found in a de Bruijn pattern", .description = "It search for a particular value in the pattern as returned by the `wD` command. is assumed to be a number of as few bytes as necessary, in the endian specified by cfg.bigendian.", .args = write_debruijn_find_args, }; diff --git a/librz/core/cmd_descs/cmd_write.yaml b/librz/core/cmd_descs/cmd_write.yaml index 5e4d5fc851..9a8723881a 100644 --- a/librz/core/cmd_descs/cmd_write.yaml +++ b/librz/core/cmd_descs/cmd_write.yaml @@ -143,7 +143,7 @@ commands: type: RZ_CMD_ARG_TYPE_NUM - name: w cname: write_incdec - summary: increment/decrement byte, word, .. + summary: Increment/decrement byte, word, ... options: <1248><+-> args_str: " []" type: RZ_CMD_DESC_TYPE_INNER @@ -452,7 +452,7 @@ commands: optional: true - name: ww cname: write_wide_string - summary: Write wide 16 little endian string + summary: Write wide (16-bit) little-endian string args: - name: string type: RZ_CMD_ARG_TYPE_STRING @@ -548,7 +548,7 @@ commands: comment: Swap the condition of the current conditional instruction - name: wb cname: write_block - summary: Write in current block an hexstring cyclically + summary: Write in current block a hexstring cyclically args: - name: hex type: RZ_CMD_ARG_TYPE_STRING @@ -709,17 +709,17 @@ commands: arg_str: "" comment: "Content before: 1122334455667788; Content after: 4433221188776655" - name: wD - summary: Write De Bruijn Pattern + summary: Write de Bruijn pattern subcommands: - name: wD cname: write_debruijn - summary: Write a De Bruijn Pattern of length at the current offset + summary: Write a de Bruijn pattern of length at the current offset args: - name: len type: RZ_CMD_ARG_TYPE_RZNUM - name: wD/ cname: write_debruijn_find - summary: Returns the offset where can be found in a De Bruijn Pattern + summary: Returns the offset where can be found in a de Bruijn pattern description: > It search for a particular value in the pattern as returned by the `wD` command. is assumed to be a number of as few bytes as