Touch up rz-run -h (#5450)

This commit is contained in:
Khairul Azhar Kasmiran 2025-10-11 12:25:32 +08:00 committed by GitHub
parent 32921799cc
commit 58ab58962f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 17 deletions

View file

@ -5,17 +5,16 @@
.Nd rizin utility to run programs in custom environments
.Sh SYNOPSIS
.Nm rz-run
.Op [directives]
.Op [script.rz]
.Op [--] [program] [args]
.Op Ar directives | script.rz
.Op Fl - Ar program Op Ar args
.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 filedescriptors.
This program is used as a launcher for running programs with different environment, arguments, permissions, directories and overridden default file descriptors.
.Pp
.Bl -tag -width Fl
.It Fl l
List all the supported profile options.
List all the supported profile directives.
.Pp
.It Fl t
Output a base template profile. Try rz-run -d > profile.rz
@ -24,7 +23,7 @@ Output a base template profile. Try rz-run -d > profile.rz
Show the terminal name and wait for a connection from another process. Try rz-run stdio=<ttypath> program=/bin/sh
.El
.Pp
The program just 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 :)
.Sh DIRECTIVES

View file

@ -26,15 +26,15 @@ static void rz_run_tty(void) {
static void rz_run_help(int v) {
if (v == 0) {
printf(Color_CYAN "Usage: ");
printf(Color_RESET "[directives] [script.rz] [--] [program] [args]\n");
printf(Color_RESET "rz-run [directives | script.rz] [-- program [args]]\n");
const char *options[] = {
// clang-format off
"-h", "", "Show this help",
"-l", "", "Show profile options",
"-l", "", "Show profile directives",
"-t", "", "Output template profile",
"-v", "", "Show version information",
"-w", "", "Wait for incoming terminal process",
"--", "[program] [args]", "Run commands",
"--", "program [args]", "Run program",
// clang-format on
};
rz_print_colored_help(options, RZ_ARRAY_SIZE(options), false);
@ -93,7 +93,7 @@ static void rz_run_help(int v) {
}
if (v == 2) {
// clang-format off
printf(Color_CYAN "Supported RzRun profile options:\n"
printf(Color_CYAN "Supported RzRun profile directives:\n"
Color_RESET
"arg[0-511] Set value for argument N passed to the program\n"
"aslr Enable or disable ASLR\n"

View file

@ -591,13 +591,13 @@ ec diff.unmatch red | mismatch color
 All the input (besides -s/-x/-c) can be hexadecimal or strings
 If 's:' prefix is specified
Usage: [directives] [script.rz] [--] [program] [args]
-h Show this help
-l Show profile options
-t Output template profile
-v Show version information
-w Wait for incoming terminal process
-- [program] [args] Run commands
Usage: rz-run [directives | script.rz] [-- program [args]]
-h Show this help
-l Show profile directives
-t Output template profile
-v Show version information
-w Wait for incoming terminal process
-- program [args] Run program
Usage: rz-sign [-aqv] [-e k=v] (-c pat sig | -o sig bin | -d sig)
-h Show this help