Fix/mandoc manpages (#6027)

This commit is contained in:
WhiteBai1 2026-03-15 21:01:56 +08:00 committed by GitHub
parent c187aeeb5b
commit 10e97a0876
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 390 additions and 312 deletions

32
.github/workflows/man.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Manpage lint
on:
push:
paths:
- 'binrz/man/*.[1-9]'
pull_request:
paths:
- 'binrz/man/*.[1-9]'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
mandoc:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install mandoc
run: |
sudo apt-get update
sudo apt install -y mandoc
- name: Lint binrz manpages
run: |
cd binrz/man
for f in *.[1-9]; do
[ -e "$f" ] || continue
mandoc -Werror -Tlint "$f"
done

View file

@ -1,5 +1,6 @@
.Dd Jan 22, 2024
.Dd January 22, 2024
.Dt RZ_ASM 1
.Os
.Sh NAME
.Nm rz-asm
.Nd rizin assembler and disassembler tool
@ -22,8 +23,10 @@
.Sh DESCRIPTION
This command is part of the Rizin project.
.Pp
This tool uses RzAsm to assemble and disassemble files or hexpair strings. It supports a large list of architectures which can be listed using the \-L flag.
.Pp
This tool uses RzAsm to assemble and disassemble files or hexpair strings.
It supports a large list of architectures which can be listed using the
.Fl L
flag.
.Bl -tag -width Fl
.It Fl a Ar arch
Set architecture to assemble/disassemble (see -L)
@ -37,7 +40,7 @@ Binary input/output (-l is mandatory for binary input)
Select specific CPU (depends on the arch)
.It Fl C
Output in C format
.It Fl d, D
.It Fl d , D
Disassemble from hexpair bytes (-D show hexpairs)
.It Fl e
Use big endian instead of little endian
@ -49,7 +52,7 @@ Display ESIL expression (same input as in -d)
Read data from file
.It Fl F Ar in:out
Specify input and/or output filters (att2intel, x86.pseudo, ...)
.It Fl h, hh
.It Fl h , hh
Show usage help message, hh for long
.It Fl i Ar len
Ignore N bytes of the input buffer
@ -63,7 +66,7 @@ Input/Output length
List asm plugins: (a=asm, d=disasm, A=analyze, e=ESIL, I=RzIL)
.It Fl m Ar plugin
List supported CPUs for the chosen plugin
.It Fl o, @ Ar addr
.It Fl o , @ Ar addr
Set start address for code (default 0)
.It Fl O Ar file
Output file name (rz-asm -Bf a.asm -O a)
@ -83,8 +86,7 @@ Use hex dwords instead of hex pairs when assembling
Describe opcode
.El
.Sh Directives
.Pp
.Bl -tag -width
.Bl -tag -width Ic
.It Ic .intel_syntax
Use Intel syntax rather than AT&T
.It Ic .att_syntax
@ -141,8 +143,8 @@ Mark the start of the text section
Set the Thumb mode (as opposed to ARM) for ARM architecture
.El
.Sh ENVIRONMENT
.Pp
RZ_ARCH: e asm.arch - architecture to assemble/disassemble (same as rz-asm -a)
RZ_ARCH: e asm.arch - architecture to assemble or
disassemble(same as rz-asm -a)
.Pp
RZ_ASM_ARCH: architecture to assemble/disassemble (same as rz-asm -a)
.Pp
@ -153,29 +155,23 @@ RZ_BITS: e asm.bits - cpu register size (8, 16, 32, 64) (same as rz-asm -b)
RZ_DEBUG: if defined, show error messages and crash signal\n"
.Pp
RZ_NOPLUGINS: do not load shared plugins (speedup loading)\n"
.Sh EXAMPLES
.Pp
Assemble opcode:
.Pp
.Nm rz-asm Fl a Cm x86 Fl b Cm 32 Ar 'mov eax, 33'
.Pp
Disassemble opcode:
.Pp
.Nm rz-asm Fl d Cm 90
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-find(1) ,
.Xr rz-hash(1) ,
.Xr rz-bin(1) ,
.Xr rz-diff(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1) ,
.Xr rz-ax(1) ,
.Xr rizin 1 ,
.Xr rz-ax 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1 ,
.Xr rz-hash 1 ,
.Xr rz-run 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,5 +1,6 @@
.Dd Dec 28, 2020
.Dd December 28, 2020
.Dt RZ_AX 1
.Os
.Sh NAME
.Nm rz-ax
.Nd rizin base converter
@ -10,7 +11,8 @@
.Sh DESCRIPTION
This command is part of the Rizin project.
.Pp
This command allows you to convert values between positive and negative integer, float, octal, binary, ternary, and hexadecimal values.
This command allows you to convert values between positive and
negative integer, float, octal, binary, ternary, and hexadecimal values.
.Sh OPTIONS
.Bl -tag -width Fl
.It Fl a
@ -30,7 +32,8 @@ Base64 encode
.It Fl f
Floating point arithmetic (rz-ax -f 6.3+2.1)
.It Fl F
Read C strings from stdin and output in hexpairs. Useful to load shellcodes (rz-ax -F < shellcode.[c/py/js])
Read C strings from stdin and output in hexpairs.
Useful to load shellcodes (rz-ax -F < shellcode.[c/py/js])
.It Fl h
Show usage help message
.It Fl i
@ -46,9 +49,9 @@ Convert binary to hexadecimal (rz-ax -L 111111111 outputs 0x1ff)
.It Fl n
Show hexpairs from integer value (rz-ax -n 0x1234 # 34120000)
.It Fl N
Show hex C string from integer value (rz-ax -N 0x1234 # \x34\x12\x00\x00)
Show hex C string from integer value (rz-ax -N 0x1234 # \ex34\ex12\ex00\ex00)
.It Fl o
Convert from octal string to char (rz-ax -o \162 \172 # rz)
Convert from octal string to char (rz-ax -o \e162 \e172 # rz)
.It Fl r
Rz style output (rz-ax -r 0x1234)
.It Fl s
@ -73,7 +76,6 @@ Convert a string into a hash (rz-ax -x linux osx)
Show position of set bits in the binary representation (rz-ax -p 0xb3)
.El
.Sh USAGE
.Pp
Force output mode (numeric base)
.Pp
=f floating point
@ -104,8 +106,8 @@ Available variable types are:
raw \-> hex rz-ax -S < /binfile
hex \-> raw rz-ax -s 414141
.Pp
With no arguments, rz-ax read values from stdin. You can pass one or more values
as arguments.
With no arguments, rz-ax read values from stdin.
You can pass one or more values as arguments.
.Pp
$ rz-ax 33 0x41 0101b
0x21
@ -123,21 +125,20 @@ And it supports some math operations.
0x5*101b+5
30
.Pp
It is a very useful tool for scripting, so you can read floating point values, or get the integer offset of a jump or a stack delta when analyzing programs.
.Pp
It is a very useful tool for scripting,
so you can read floating point values,
or get the integer offset of a jump or a stack delta when analyzing programs.
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-hash(1) ,
.Xr rz-find(1) ,
.Xr rz-bin(1) ,
.Xr rz-diff(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1) ,
.Xr rz-asm(1) ,
.Xr rz-sign(1)
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1 ,
.Xr rz-hash 1 ,
.Xr rz-run 1 ,
.Xr rz-sign 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,5 +1,6 @@
.Dd Jan 24, 2024
.Dd January 24, 2024
.Dt RZ_BIN 1
.Os
.Sh NAME
.Nm rz-bin
.Nd Binary program info extractor
@ -15,7 +16,7 @@
.Op Fl m Ar addr
.Op Fl n Ar str
.Op Fl N Ar m:M
.Op Fl P Ar pdb
.Op Fl P Ar pdb
.Op Fl o Ar str
.Op Fl O Ar str
.Op Fl k Ar query
@ -24,7 +25,9 @@
.Sh DESCRIPTION
This command is part of the Rizin project.
.Pp
rz-bin can analyze and extract useful information from binary executable files like ELF, PE, Mach-O, etc. It supports multiple architectures like x86, ARM, MIPS, PowerPC, etc.
rz-bin can analyze and extract useful information
from binary executable files like ELF, PE, Mach-O, etc.
It supports multiple architectures like x86, ARM, MIPS, PowerPC, etc.
.Sh OPTIONS
.Bl -tag -width Fl
.It Fl @ Ar addr
@ -141,33 +144,33 @@ Dump raw strings to stdout (for huge files)
Guess size of binary program
.El
.Sh ENVIRONMENT
.Pp
RZ_BIN_CODESIGN_VERBOSE: make code signatures verbose
.Pp
RZ_BIN_DEBUGINFOD_URLS: e bin.dbginfo.debuginfod_urls - use alternative debuginfod server
.Pp
RZ_BIN_DEMANGLE: e bin.demangle - do not demangle symbols
.Pp
RZ_BIN_LANG: e bin.lang - assume lang for demangling
.Pp
RZ_BIN_MAXSTRBUF: e bin.maxstrbuf - specify maximum buffer size
.Pp
RZ_BIN_PDBSERVER: e pdb.server - use alternative PDB server
.Pp
RZ_BIN_PREFIX: e bin.prefix - prefix symbols/sections/relocs with a specific string
.Pp
RZ_BIN_STRFILTER: e bin.str.filter - rizin -qc 'e bin.str.filter=??' -
.Pp
RZ_BIN_STRPURGE: e bin.str.purge - try to purge false positives
.Pp
RZ_BIN_SYMSTORE: e pdb.symstore - path to downstream symbol store
.Pp
RZ_CONFIG: sdb config file
.Pp
RZ_NOPLUGINS: do not load shared plugins (speedup loading)
.Bl -tag -width RZ_BIN_DEBUGINFOD_URLS
.It Ev RZ_BIN_CODESIGN_VERBOSE
make code signatures verbose
.It Ev RZ_BIN_DEBUGINFOD_URLS
bin.dbginfo.debuginfod_urls - use alternative debuginfod server
.It Ev RZ_BIN_DEMANGLE
bin.demangle - do not demangle symbols
.It Ev RZ_BIN_LANG
bin.lang - assume lang for demangling
.It Ev RZ_BIN_MAXSTRBUF
bin.maxstrbuf - specify maximum buffer size
.It Ev RZ_BIN_PDBSERVER
pdb.server - use alternative PDB server
.It Ev RZ_BIN_PREFIX
bin.prefix - prefix symbols/sections/relocs with a specific string
.It Ev RZ_BIN_STRFILTER
bin.str.filter - rizin -qc 'e bin.str.filter=??' -
.It Ev RZ_BIN_STRPURGE
bin.str.purge - try to purge false positives
.It Ev RZ_BIN_SYMSTORE
pdb.symstore - path to downstream symbol store
.It Ev RZ_CONFIG
sdb config file
.It Ev RZ_NOPLUGINS
do not load shared plugins (speedup loading)
.El
.Sh EXAMPLES
.Pp
List symbols of a program:
.Pp
.Nm rz-bin Fl s Ar a.out
@ -186,17 +189,15 @@ Load symbols and imports from rizin:
.Pp
[0x00000000]> .!rz-bin -prsi $FILE
.Sh SEE ALSO
.Pp
.Xr rz-hash(1) ,
.Xr rz-find(1) ,
.Xr rizin(1) ,
.Xr rz-diff(1) ,
.Xr rz-asm(1) ,
.Xr rz-ax(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1)
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-ax 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1 ,
.Xr rz-hash 1 ,
.Xr rz-run 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,21 +1,24 @@
.Dd Aug 25, 2023
.Dd August 25, 2023
.Dt RZ_DIFF 1
.Os
.Sh NAME
.Nm RZ_DIFF
.Nd Compare files and find binary differences.
.Nd Compare files and find binary differences
.Sh SYNOPSIS
.Nm rz-diff
.B rz-diff
[\fIOPTIONS\fR]
\fIfile0\fR
\fIfile1\fR
.Op Ar OPTIONS
.Ar file0
.Ar file1
.Sh DESCRIPTION
rz-diff compares two files or binary programs and highlights the differences between them. It supports diffing different aspects like raw bytes, text lines, functions, sections, strings, etc., based on the options used.
.Pp
rz-diff compares two files or binary programs
and highlights the differences between them.
It supports diffing different aspects
like raw bytes, text lines, functions, sections, strings, etc.,
based on the options used.
.Bl -tag -width Fl
.It Fl A
Compare virtual addresses from file0 with physical addresses in file1
.It Fl a Ar arch
.It Fl a Ar arch
Specify the architecture plugin to use for analysis (e.g., x86, arm)
.It Fl b Ar bits
Specify the register size for the chosen architecture (e.g., 16, 32, 64)
@ -25,7 +28,7 @@ Run 'aaa' when loading the binary
Disable the use of colors in the output
.It Fl d Ar algo
Compute the edit distance between files using the chosen algorithm:
.Bl -tag -width
.Bl -tag -width Ic
.It Ic myers
Eugene W. Myers' O(ND) algorithm (no substitution)
.It Ic leven
@ -35,11 +38,11 @@ Context triggered piecewise hashing comparison
.El
.It Fl e Ar k=v
Set an evaluable config variable
.It Fl H
.It Fl H
Enable hexadecimal visual mode for comparing files in hexadecimal format
.It Fl h
Display the help message
.It Fl i
.It Fl i
Use command line arguments instead of files (only for -d)
.It Fl j
Output the comparison results in JSON format
@ -53,7 +56,7 @@ Input for file1 when option -t 'commands' is given
Set the width and height of the terminal for visual mode
.It Fl t Ar type
Compute the difference between two files based on the specified type:
.Bl -tag -width
.Bl -tag -width Ic
.It Ic bytes
Compare raw bytes in the files (only for small files)
.It Ic lines
@ -90,18 +93,18 @@ Show version information for rz-diff
.It Fl v
be more verbose (stderr output)
.El
.Pp
Palette colors can be changed by adding the following lines inside the $HOME/.rizinrc file
.Bl -tag
.Pp
Palette colors can be changed by adding the following lines
inside the $HOME/.rizinrc file
.Bl -tag -width Ic
.It Ic ec diff.unknown blue
offset color
.It Ic ec diff.match green
match color
.It Ic ec diff.unmatch red
mismatch color
mismatch color
.El
.Sh EXAMPLE
.Pp
.Sh EXAMPLES
Compare two binary files using the default settings:
.Pp
.Nm rz-diff Ar file1.bin Ar file2.bin
@ -114,17 +117,15 @@ Compare two functions from an architecture plugin:
.Pp
.Nm rz-diff Fl t Cm graphs Fl 0 Cm function1 Fl 1 Cm function2 Ar binary1 Ar binary2
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-find(1) ,
.Xr rz-hash(1) ,
.Xr rz-bin(1) ,
.Xr rz-asm(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1) ,
.Xr rz-ax(1) ,
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-ax 1 ,
.Xr rz-bin 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1 ,
.Xr rz-hash 1 ,
.Xr rz-run 1
.Sh AUTHORS
.An pancake <pancake@nopcode.org>
.Pp
pancake <pancake@nopcode.org>
.It
byteninjaa0

View file

@ -1,36 +1,38 @@
.TH ESIL 7
.SH NAME
ESIL \- Evaluable Strings Intermediate Language
.SH DESCRIPTION
ESIL aims to describe a Forth-like representation for every target CPU opcode semantics. ESIL representations can be evaluated (interpreted) in order to emulate individual instructions.
.SH SYNTAX
.Dd March 12, 2026
.Dt RZ_ESIL 7
.Os
.Sh NAME
.Nm rz-esil
.Nd Evaluable Strings Intermediate Language
.Sh DESCRIPTION
ESIL aims to describe a Forth-like representation
for every target CPU opcode semantics.
ESIL representations can be evaluated (interpreted)
in order to emulate individual instructions.
.Sh SYNTAX
Each command of an ESIL expression is separated by a comma
.IP <source0>,<source1>,<operation>
.IP <source>,<destination>,<operation>
.IP <source_destination>,<operation>
.SH BASIC OPERATIONS
These operations should be enough to emulate most instructions of any architecture
.IP =
.Bl -tag -width "<source0>,<source1>,<operation>"
.It Li <source0>,<source1>,<operation>
.It Li <source>,<destination>,<operation>
.It Li <source_destination>,<operation>
.El
.Sh BASIC OPERATIONS
These operations should be enough
to emulate most instructions of any architecture
.Bl -tag -width "="
.It Li =
Set the value of the destination to the value of the source
.IP +
.It Li +
Add the values of source0 and source1 and push the result on the esil stack
.IP -
Subtract the value of source0 from the value of source1 and push the result on the esil stack
.IP *
.It Li -
Subtract the value of source0 from the value of source1
and push the result on the esil stack
.It Li *
Multiply the values of source0 and source1 and push the result on the esil stack
.IP /
.It Li /
Divide the value of source1 by the value of source0
.SH BASIC OPERATIONS EXAMPLES (x86)
.IP "jmp eax -> eax,eip,="
.SH "SEE ALSO"
.BR rizin (1)
.El
.Sh BASIC OPERATIONS EXAMPLES (x86)
.Li "jmp eax -> eax,eip,="
.Sh "SEE ALSO"
.Xr rizin 1

View file

@ -1,5 +1,6 @@
.Dd Jan 24, 2024
.Dd January 24, 2024
.Dt RZ_FIND 1
.Os
.Sh NAME
.Nm rz-find
.Nd Find byte patterns in files
@ -21,8 +22,10 @@ searches for specified byte patterns, strings, or hexpairs in the given files.
Multiple files and/or directories can be specified as arguments.
When a directory is provided, it is searched recursively.
.Pp
When searching a single file, quiet mode is enabled by default (no filename headers).
When searching multiple files or directories, each result is prefixed with the filename
When searching a single file,
quiet mode is enabled by default (no filename headers).
When searching multiple files or directories,
each result is prefixed with the filename
unless
.Fl q
is specified.
@ -46,19 +49,22 @@ Show usage help message
.It Fl i
Identify filetype (magic signatures)
.It Fl j
Output in JSON format. Results are returned as a JSON array of objects.
Output in JSON format.
Results are returned as a JSON array of objects.
.It Fl m
Magic search, file-type carver
.It Fl M Ar str
Set a binary mask to be applied on keywords
.It Fl n
Do not stop the search when a read error occurs. Continue to next block or file.
Do not stop the search when a read error occurs.
Continue to next block or file.
.It Fl r
Print using rizin commands
.It Fl s Ar str
Search for a specific string (can be used multiple times)
.It Fl w Ar str
Search for a specific wide string (can be used multiple times). Assumes str is UTF-8
Search for a specific wide string (can be used multiple times).
Assumes str is UTF-8
.It Fl I Ar str
Search for an entry in import table
.It Fl S Ar str
@ -66,11 +72,13 @@ Search for a symbol in symbol table
.It Fl t Ar to
Stop search at address 'to'
.It Fl q
Quiet mode - do not show headings (filenames) above matching contents (default for searching a single file)
Quiet mode - do not show headings (filenames) above matching contents
(default for searching a single file)
.It Fl v
Show version information
.It Fl V
Verbose mode - show each file being scanned. When combined with
Verbose mode - show each file being scanned.
When combined with
.Fl j ,
verbose output is written to stderr to preserve stdout for JSON results.
.It Fl x Ar hex
@ -91,18 +99,22 @@ When multiple paths are provided:
.It
Each file is searched in the order specified.
.It
Directories are searched recursively (hidden files starting with '.' are skipped).
Directories are searched recursively
(hidden files starting with '.' are skipped).
.It
If any file cannot be opened or read, an error is printed but processing continues with remaining files.
If any file cannot be opened or read,
an error is printed but processing continues with remaining files.
.It
The exit code reflects whether all files were processed successfully (0) or if any errors occurred (1).
The exit code reflects whether all files were processed successfully (0)
or if any errors occurred (1).
.El
.Sh EXIT STATUS
.Bl -tag -width Ds
.It 0
All files were processed successfully.
.It 1
One or more files could not be opened or had read errors, or invalid arguments were provided.
One or more files could not be opened or had read errors,
or invalid arguments were provided.
.El
.Sh EXAMPLES
Search for a string in a single file:
@ -139,19 +151,16 @@ Search with aligned hits (power of 2):
.Bd -literal -offset indent
rz-find -a 4 -x "00000000" memory.dump
.Ed
.Pp
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-hash(1) ,
.Xr rz-bin(1) ,
.Xr rz-diff(1) ,
.Xr rz-asm(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1) ,
.Xr rz-ax(1)
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-ax 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-gg 1 ,
.Xr rz-hash 1 ,
.Xr rz-run 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,8 +1,9 @@
.Dd Jan 24, 2024
.Dd January 24, 2024
.Dt RZ_GG 1
.Os
.Sh NAME
.Nm rz-gg
.Nd rizin frontend for RzEgg, compile programs into tiny binaries for different architectures.
.Nd rizin frontend for RzEgg, compile programs into tiny binaries for different architectures
.Sh SYNOPSIS
.Nm rz-gg
.Op Fl FOLsrxvhz
@ -29,12 +30,17 @@
.Sh DESCRIPTION
This command is part of the Rizin project.
.Pp
Programs generated by RzEgg are relocatable and can be injected into a running process or on-disk binary file.
Programs generated by RzEgg are relocatable
and can be injected into a running process or on-disk binary file.
.Pp
Since the rz-gg-cc merge, rz-gg can now generate shellcodes from C code. The final code can be linked with rz-bin, and it is relocatable, allowing injection into any remote process. This feature is conceptually based on shellforge4, but only supports Linux/OSX x86-32/64 platforms.
Since the rz-gg-cc merge, rz-gg can now generate shellcodes from C code.
The final code can be linked with rz-bin,
and it is relocatable, allowing injection into any remote process.
This feature is conceptually based on shellforge4,
but only supports Linux/OSX x86-32/64 platforms.
.Sh DIRECTIVES
.Pp
The rrz (rz-gg) configuration file accepts the following directives, described as key=value entries and comments defined as lines starting with '#'.
The rrz (rz-gg) configuration file accepts the following directives,
described as key=value entries and comments defined as lines starting with '#'.
.Bl -tag -width Fl
.It Fl a Ar arch
Select architecture (x86, mips, arm)
@ -43,7 +49,8 @@ Set register size (32, 64, ..)
.It Fl B Ar hexpairs
Append hexpair bytes
.It Fl c Ar k=v
Set configure option for the shellcode encoder. The argument must be key=value
Set configure option for the shellcode encoder.
The argument must be key=value
.It Fl C Ar file
Append contents of file
.It Fl d Ar off:dword
@ -51,7 +58,8 @@ Patch dword (4 bytes) at given offset
.It Fl D Ar off:qword
Patch qword (8 bytes) at given offset
.It Fl e Ar encoder
Use specific encoder. See -L
Use specific encoder.
See -L
.It Fl f Ar format
Output format (raw, c, pe, elf, mach0, python, javascript)
.It Fl F
@ -59,7 +67,8 @@ Output native format (osx=mach0, linux=elf, ..)
.It Fl h
Show usage help message
.It Fl i Ar shellcode
Include shellcode plugin, use options. See -L
Include shellcode plugin, use options.
See -L
.It Fl I Ar path
Add include path
.It Fl k Ar kernel
@ -99,58 +108,63 @@ Execute rop chain, using the stack provided
.It Fl z
Output in C string syntax
.El
.Sh EXAMPLE
.Pp
$ cat hi.r
/* hello world in RzEgg */
write@syscall(4); //x64 write@syscall(1);
exit@syscall(1); //x64 exit@syscall(60);
.Pp
main@global(128) {
.var0 = "hi!\\n";
write(1,.var0, 4);
exit(0);
}
$ rz-gg \-O \-F hi.r
$ ./hi
hi!
.Pp
# With C file :
$ cat hi.c
main() {
write(1, "Hello\\n", 6);
exit(0);
}
$ rz-gg -O -F hi.c
.Pp
$ ./hi
Hello
.Pp
# Linked into a tiny binary. This is 165 bytes
$ wc \-c < hi
165
.Pp
# The compiled shellcode has zeroes
$ rz-gg hi.c | tail -1
eb0748656c6c6f0a00bf01000000488d35edffffffba06000000b8010
000000f0531ffb83c0000000f0531c0c3
.Pp
# Use a xor encoder with key 64 to bypass
$ rz-gg \-e xor \-c key=64 \-B $(rz-gg hi.c | tail -1)
6a2d596a405be8ffffffffc15e4883c60d301e48ffc6e2f9ab4708252
c2c2f4a40ff4140404008cd75adbfbfbffa46404040f8414040404f45
71bff87c4040404f45718083
.Sh EXAMPLES
.Bd -literal
$ cat hi.r
/* hello world in RzEgg */
write@syscall(4); //x64 write@syscall(1);
exit@syscall(1); //x64 exit@syscall(60);
.Ed
.Bd -literal
main@global(128) {
.var0 = "hi!\\n";
write(1,.var0, 4);
exit(0);
}
$ rz-gg \-O \-F hi.r
$ ./hi
hi!
.Ed
.Bd -literal
# With C file:
$ cat hi.c
main() {
write(1, "Hello\\n", 6);
exit(0);
}
$ rz-gg -O -F hi.c
.Ed
.Bd -literal
$ ./hi
Hello
.Ed
.Bd -literal
# Linked into a tiny binary.
# This is 165 bytes
$ wc \-c < hi
165
.Ed
.Bd -literal
# The compiled shellcode has zeroes
$ rz-gg hi.c | tail -1
eb0748656c6c6f0a00bf01000000488d35edffffffba06000000b8010
000000f0531ffb83c0000000f0531c0c3
.Ed
.Bd -literal
# Use a xor encoder with key 64 to bypass
$ rz-gg \-e xor \-c key=64 \-B $(rz-gg hi.c | tail -1)
6a2d596a405be8ffffffffc15e4883c60d301e48ffc6e2f9ab4708252
c2c2f4a40ff4140404008cd75adbfbfbffa46404040f8414040404f45
71bff87c4040404f45718083
.Ed
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-hash(1) ,
.Xr rz-find(1) ,
.Xr rz-bin(1) ,
.Xr rz-find(1) ,
.Xr rz-diff(1) ,
.Xr rz-asm(1) ,
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-hash 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,5 +1,6 @@
.Dd Jan 24, 2024
.Dd January 24, 2024
.Dt RZ_HASH 1
.Os
.Sh NAME
.Nm rz-hash
.Nd block based hashing utility
@ -20,11 +21,18 @@
.Sh DESCRIPTION
This program is part of the Rizin project.
.Pp
rz-hash allows you to calculate, check and show the hash values of each block of a target file. The block size is 32768 bytes by default. It's allowed to hash from stdin using '-' as a target file. You can compare against a known hash and get the result in the exit status.
rz-hash allows you to calculate, check
and show the hash values of each block of a target file.
The block size is 32768 bytes by default.
It's allowed to hash from stdin using '-' as a target file.
You can compare against a known hash and get the result in the exit status.
.Pp
You can hash big files by hashing each block and later determine what part of it has been modified. Useful for filesystem analysis.
You can hash big files by hashing each block
and later determine what part of it has been modified.
Useful for filesystem analysis.
.Pp
This command can be used to calculate hashes of a certain part of a file or a command line passed string.
This command can be used to calculate hashes of a certain part of a file
or a command line passed string.
.Pp
This is the command used by the 'ph' command of rizin.
.Bl -tag -width Fl
@ -32,10 +40,12 @@ This is the command used by the 'ph' command of rizin.
Show version information
.It Fl h
Show usage help message
.It Fl
.It Fl
Input read from stdin instead of from a file
.It Fl a Ar algo
Hash algorithm to use; you can specify multiple ones by appending a comma (example: sha1,md4,md5,sha256)
Hash algorithm to use;
you can specify multiple ones by appending a comma
(example: sha1,md4,md5,sha256)
.It Fl B
Output the calculated value for each block
.It Fl b Ar size
@ -65,33 +75,36 @@ List all algorithms
.It Fl q
Set quiet mode (use -qq to get only the calculated value)
.It Fl S Ar seed
Set the seed for -a; use '^' to append it before the input. Use '@' prefix to load it from a file and '-' to read it
Set the seed for -a;
use '^' to append it before the input.
Use '@' prefix to load it from a file and '-' to read it
.It Fl K Ar key
Set the HMAC key for -a and the key for -E/-D. Use '@' prefix to load it from a file and '-' to read it from stdin (you can combine them)
Set the HMAC key for -a and the key for -E/-D.
Use '@' prefix to load it from a file and '-' to read it from stdin
(you can combine them)
.It Fl s Ar string
Input read from a zero-terminated string instead of from a file
.It Fl x Ar hex
Input read from a hexadecimal value instead of from a file
.Pp
All the inputs (besides -s/-x/-c) can be hexadecimal or strings if 's:' prefix is specified.
All the inputs (besides -s/-x/-c) can be hexadecimal
or strings if 's:' prefix is specified.
.El
.Sh DIAGNOSTICS
.Ex -std
.Pp
When -c is used, exit status 0 indicates a match between the expected and computed hashes
When -c is used, exit status 0 indicates a match
between the expected and computed hashes
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-find(1) ,
.Xr rz-hash(1) ,
.Xr rz-bin(1) ,
.Xr rz-diff(1) ,
.Xr rz-asm(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1) ,
.Xr rz-ax(1) ,
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-ax 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1 ,
.Xr rz-run 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,5 +1,6 @@
.Dd Jan 24, 2024
.Dd January 24, 2024
.Dt RZ_RUN 1
.Os
.Sh NAME
.Nm rz-run
.Nd rizin utility to run programs in custom environments
@ -10,25 +11,29 @@
.Sh DESCRIPTION
This command is part of the Rizin project.
.Pp
This program is used as a launcher for running programs with different environment, arguments, permissions, directories and overridden default file descriptors.
.Pp
This program is used as a launcher for running programs
with different environment, arguments, permissions, directories
and overridden default file descriptors.
.Bl -tag -width Fl
.It Fl l
List all the supported profile directives.
.Pp
.It Fl t
Output a base template profile. Try rz-run -d > profile.rz
.Pp
Output a base template profile.
Try rz-run -d > profile.rz
.It Fl w
Show the terminal name and wait for a connection from another process. Try rz-run stdio=<ttypath> program=/bin/sh
Show the terminal name and wait for a connection from another process.
Try rz-run stdio=<ttypath> program=/bin/sh
.El
.Pp
The program accepts a single argument which is the filename of the configuration file to run the program.
The program accepts a single argument
which is the filename of the configuration file to run the program.
.Pp
It is useful when you have to run a program using long arguments or pass long data to stdin or things like that usually required for exploiting crackmes :)
It is useful when you have to run a program
using long arguments or pass long data to stdin
or things like that usually required for exploiting crackmes :)
.Sh DIRECTIVES
.Pp
The rrz (rz-run) configuration file accepts the following directives, described as key=value entries and comments defined as lines starting with '#'.
The rrz (rz-run) configuration file accepts the following directives,
described as key=value entries and comments defined as lines starting with '#'.
.Bl -tag -width Fl
.It Ar arg[0-511]
Set value for argument N passed to the program
@ -49,7 +54,9 @@ Use a pty for connection over socket (with connect/listen)
.It Ar envfile
Set a file with lines like `var=value` to be used as env
.It Ar fork
Used with the listen option, allow to spawn a different process for each connection. Ignored when debugging.
Used with the listen option,
allow to spawn a different process for each connection.
Ignored when debugging.
.It Ar input
Set string to be passed to the program via stdin
.It Ar libpath
@ -67,7 +74,8 @@ Set the niceness level of the process
.It Ar preload
Preload a library (not supported on Windows, only linux,osx,bsd)
.It Ar daemon
Set to false by default, otherwise it will run the program in background, detached from the terminal.
Set to false by default,
otherwise it will run the program in background, detached from the terminal.
.It Ar program
Path to program to be executed
.It Ar pid
@ -79,7 +87,8 @@ Path to the library to be executed
.It Ar runlib.fcn
Function name to call from runlib library
.It Ar rzpreload
Preload with librz, kill -USR1 to get an rizin shell or -USRZ to spawn a webserver in a thread
Preload with librz,
kill -USR1 to get an rizin shell or -USRZ to spawn a webserver in a thread
.It Ar setenv
Set value for given environment variable
.It Ar setegid
@ -113,7 +122,6 @@ Unset one environment variable
.El
.Sh VALUE PREFIXES
Every value in this configuration file can contain a special
.Pp
.Bl -tag -width Fl
.It Ar @filename
Slurp contents of file and put them inside the key
@ -166,24 +174,26 @@ Debugging a program redirecting io to another terminal
## Or you can use -R to set a key=value
rizin \-R stdio=/dev/ttys010 -d ls
.Pp
You can also use the -- flag to specify program and arguments in a more natural way:
You can also use the
.Ic --
flag to specify program and arguments in a more natural way:
.Pp
.Nm rz-run Cm timeout=2 Ar -- sleep 4
.Nm rz-run Cm timeout=2 Ar
.Ic --
sleep 4
.Pp
Run a library function
.Pp
.Nm rz-run Cm runlib=/lib/libc-2.25.so Cm runlib.fcn=system Cm arg1="ls /"
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-hash(1) ,
.Xr rz-find(1) ,
.Xr rz-bin(1) ,
.Xr rz-diff(1) ,
.Xr rz-gg(1) ,
.Xr rz-asm(1) ,
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1
.Xr rz-hash 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0

View file

@ -1,5 +1,6 @@
.Dd Jan 21, 2024
.Dd January 21, 2024
.Dt RZ_SIGN 1
.Os
.Sh NAME
.Nm RZ_SIGN
.Nd rizin signature utility
@ -10,34 +11,36 @@
.Fl ( c Ar pat sig | Fl o Ar sig bin | Fl d Ar sig )
.Sh DESCRIPTION
rz-sign allows to create and inspect FLIRT code signatures.
.Pp
.Bl -tag -width Fl
.It Fl a, aa
Analyze binary after loading it with RzCore and use -aa to run aaaa instead of aaa. Available only
.It Fl a , aa
Analyze binary after loading it with RzCore
and use -aa to run aaaa instead of aaa.
Available only
together with the -o option.
.It Fl c Ar output.pat input.sig
Interpret the input file as a FLIRT signature file and dump the pattern format.
.It Fl d Ar flirt.sig
Parse a FLIRT signature file.
.It Fl e
Set an evaluable config variable. Available only together with the -o option.
Set an evaluable config variable.
Available only together with the -o option.
.It Fl h
Show usage help message.
.It Fl o Ar output.sig input.bin
Perform an analysis of a binary and generate FLIRT signatures for all functions inside it.
Perform an analysis of a binary
and generate FLIRT signatures for all functions inside it.
.It Fl q
Enable quiet mode.
.It Fl v
Show version information.
.El
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-find(1) ,
.Xr rz-hash(1) ,
.Xr rz-bin(1) ,
.Xr rz-asm(1) ,
.Xr rz-gg(1) ,
.Xr rz-run(1) ,
.Xr rz-ax(1) ,
.Xr rz-diff(1) ,
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-ax 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-gg 1 ,
.Xr rz-hash 1 ,
.Xr rz-run 1

View file

@ -1,5 +1,6 @@
.Dd Jan 24, 2024
.Dd January 24, 2024
.Dt RZ_TEST 1
.Os
.Sh NAME
.Nm rz-test
.Nd rizin regression testsuite
@ -56,26 +57,21 @@ Number of expected failed tests
Supported test types: @json @unit @fuzz @cmds
.El
.Sh ENVIRONMENT
.Pp
EDITOR: editor to use (eg: "vim")
.Sh USAGE
.Pp
Use the -n flag to dont run any test. Just load them.
Use the -n flag to dont run any test.
Just load them.
.Pp
$ rz-test -n
[rz-test] Loading tests...
.Sh SEE ALSO
.Pp
.Xr rizin(1) ,
.Xr rz-hash(1) ,
.Xr rz-find(1) ,
.Xr rz-bin(1) ,
.Xr rz-find(1) ,
.Xr rz-diff(1) ,
.Xr rz-asm(1) ,
.Xr rizin 1 ,
.Xr rz-asm 1 ,
.Xr rz-bin 1 ,
.Xr rz-diff 1 ,
.Xr rz-find 1 ,
.Xr rz-hash 1
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>
.An pancake <pancake@nopcode.org>
.Pp
byteninjaa0