.TH "hexec" "1" "November 2008" "" "" .SH "NAME" hexec \- a process execution hooking tool .SH "SYNOPSIS" .PP hexec [expr] [cmd] [args\&.\&.\&.] .PP .SH "DESCRIPTION" .PP hexec is a tool to hook into process exececution calls (exec family of syscalls)\&. You can define an expression that is executed against any hooked exec call\&. This expression may also contain a replacement exec call\&. .PP .SH "OPTIONS SUMMARY" .PP Here is a summary of the options to hexec\&. .PP .nf --help | -h Print a options/expr summary page --version | -v Print hexec version --log-out | -lo set output file for error and -print output .fi .PP .SH "OPTIONS" .PP .IP "\fB-h\fP" Print a options/expr summary page .IP "\fB--help\fP" Print a options/expr summary page .IP "\fB-lo\fP" Set the output file for error and -print output\&. This can be required if writing to stderr could cause malfunction because some processes read from stderr and expect a well defined output\&. .IP .SH "EXPRESSIONS" .PP The expression is executed against all process execution calls\&. If the expression returns true, the original call is skipped\&. .PP .IP "\fB -and \fP" .IP "\fB -a \fP" .IP "\fB \fP" Returns true if both expressions return true\&. If the left returns false, the right expression is never executed\&. .IP "\fB -or \fP" .IP "\fB -o \fP" Returns true if one of both expressions returns true\&. If the left returns true, the right expression is never executed\&. .IP "\fB-path \fP" Returns true if the path of the executable matches \&. is a bash compatible wild card pattern\&. .IP "\fB-ipath \fP" Same as -path, but case insensitive\&. .IP "\fB-name \fP" Returns true if the base name of the executable matches \&. is a bash compatible wild card pattern\&. .IP "\fB-iname \fP" Same as -name, but case insensitive\&. .IP "\fB-contains \fP" Returns true if the path of the executable containes the string \&. .IP "\fB-icontains \fP" Same as -contains, but case insensitive\&. .IP "\fB-print\fP" Print all arguments to the called process\&. Returns always true\&. .IP "\fB-exec [args\&.\&.\&.] ;\fP" Executes with [args\&.\&.\&.] as arguments\&. This expression must be terminated with a semicolon\&. You can use argument placeholders in and [args\&.\&.\&.] (see below)\&. This expression always returns true\&. .br .br \fBNOTE\fP: Please be aware that you may need to escape or quote the terminating semicolon to not confuse your shell\&. .IP "\fB-sh