RZ-RUN(1)
π RZ-RUN(1) π
okay bestie, gather round, because this is the rz-run manual page from section 1 of the manual, and it's literally the little launcher goblin that makes your programs run in whatever weird lil environment you dream up. it's giving "personal assistant for processes" and honestly? iconic. β¨
β¨ NAME β¨
rz-run β rizin utility to run programs in custom environments π
πΈ SYNOPSIS πΈ
rz-run [[directives]] [[script.rz]] [[--] [program] [args]]
π DESCRIPTION π
okay so first thing you need to know: this command is part of the Rizin project. π«Ά
This program is used as a launcher for running programs with different environment, arguments, permissions, directories and overridden default filedescriptors. no cap, that's the whole job description.
-lβ List all the supported profile options. window shopping, but for profiles ποΈ-tβ Output a base template profile. Tryrz-run -d > profile.rzβ it's a starter pack, we love a template π-wβ Show the terminal name and wait for a connection from another process. Tryrz-run stdio=<ttypath> program=/bin/shβ it just sits there, patiently waiting for its bestie to show up π¦
The program just accepts a single argument which is the filename of the configuration file to run the program. one arg. that's it. minimalism, periodt.
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 :) β yes bestie, this is the crackme exploitation support group and you're welcome here π
π DIRECTIVES π
The rrz (rz-run) configuration file accepts the following directives, described as key=value entries and comments defined as lines starting with #. so basically it's a vibe file and every line is a little instruction. slay.
arg[0-511]β Set value for argument N passed to the program πaslrβ Enable or disable ASLRbitsβ Set 32 or 64 bit (if the architecture supports it)chdirβ Change directory before executing the programchrootβ Run the program in chroot. requires some previous setup β οΈ (it needs the whole setup done first, don't skip ahead bestie)coreβ Set no limit the core file sizeconnectβ Connect stdin/stdout/stderr to a socketptyβ Use a pty for connection over socket (with connect/listen)envfileβ Set a file with lines likevar=valueto be used as envforkβ Used with the listen option, allow to spawn a different process for each connection. Ignored when debugging.inputβ Set string to be passed to the program via stdinlibpathβ Override path where the dynamic loader will look for shared librarieslistenβ Bound stdin/stdout/stderr to a listening socketmaxstackβ Set the maximum size for the stackmaxprocβ Set the maximum number of processesmaxfdβ Set the maximum number of file descriptorsniceβ Set the niceness level of the process (be nice! or don't, that's the setting π )preloadβ Preload a library (not supported on Windows, only linux,osx,bsd)daemonβ Set to false by default, otherwise it will run the program in background, detached from the terminal. main character energy, leaving the terminal behind πͺprogramβ Path to program to be executedpidβ Set to true to print the PID of the process to stderrpidfileβ Print the PID of the process to the specified filerunlibβ Path to the library to be executedrunlib.fcnβ Function name to call from runlib libraryrzpreloadβ Preload with librz, kill -USR1 to get an rizin shell or -USRZ to spawn a webserver in a threadsetenvβ Set value for given environment variablesetegidβ Set effective process group idseteuidβ Set effective process uidsetgidβ Set process group idsetuidβ Set process uidsleepβ Sleep for the given amount of seconds π΄stdio=valueβ Set io streams (stdin, stdout, stderr) to a valuestdio=!cmdβ Redirect input/output to the process created by the specified commandstdinβ Set stdin, stdout, and stderr streams to the specified valuestdoutβ Select file to replace stdout file descriptorstderrβ Select file to replace stderr file descriptorsystemβ Execute the given commandtimeoutβ Set a timeout β°timeoutsigβ Signal to use when killing the child because the timeout happensunsetenvβ Unset one environment variable
π§ VALUE PREFIXES π§
Every value in this configuration file can contain a special prefix, and these are the little magic spells you can put in front of a value. iykyk β¨
@filenameβ Slurp contents of file and put them inside the keytextβ Escape characters useful for hex chars'string'β Escape characters useful for hex chars!cmdβ Run command to store the output in the variable:102030β Parse hexpair string and store it in the variable:!cmdβ Parse hexpair string from output of command and store it in the variable%1234β Parses the input string and returns it as integer
π₯ EXAMPLES π₯
Sample rz-run script π
$ cat foo.rrz
#!/usr/bin/rz-run
program=./pp400
arg0=10
stdin=foo.txt
chdir=/tmp
clearenv=true
setenv=EGG=eggsy
setenv=NOFUN=nogames
unsetenv=NOFUN
# EGG will be the only env variable
#chroot=.
./foo.rrz
Connecting a program to a socket π
nc -l 9999
rz-run program=/bin/ls connect=localhost:9999
Debugging a program redirecting io to another terminal π₯οΈ
## open a new terminal and type 'tty' to get
$ tty ; clear ; sleep 999999
/dev/ttyS010
## in another terminal run rizin
$ rizin -r foo.rrz -d ls
$ cat foo.rrz
#!/usr/bin/rz-run
stdio=/dev/ttys010
## Or you can use -R to set a key=value
rizin -R stdio=/dev/ttys010 -d ls
You can also use the -- flag to specify program and arguments in a more natural way:
rz-run timeout=2 -- sleep 4
Run a library function π§
rz-run runlib=/lib/libc-2.25.so runlib.fcn=system arg1="ls /"
π SEE ALSO π
rizin(1), rz-hash(1), rz-find(1), rz-bin(1), rz-diff(1), rz-gg(1), rz-asm(1),
go read the whole friend group, they're all icons π
π AUTHORS π
pancake <pancake@nopcode.org>
byteninjaa0
and that's the whole page bestie!! this was therz-runpage from the Rizin project, dated Jan 24, 2024, and yes it really is calledRZ_RUN(1)down at the bottom. no notes. slay. π β¨πΈ
π¦ where this page comes from
- arch rolling: rizin 0.8.2-2 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-PDDC AND CC0-1.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND MIT
- epel 10: rizin 0.7.4-5.el10_1 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
- epel 9: rizin 0.7.4-5.el9 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
- fedora 43: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
- fedora 43: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
- fedora 44: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
- fedora 44: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
- nixos 26.05: rizin 0.8.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms