
Command Execution Options-
-e <command>,
--exec <command> (Execute command)
Execute the specified command after a connection has been
established. The command must be specified as a full pathname. All
input from the remote client will be sent to the application and
responses sent back to the remote client over the socket, thus
making your command-line application interactive over a
socket. Combined with --keep-open,
Ncat will handle multiple simultaneous connections to your
specified port/application like inetd. Ncat will only
accept a maximum, definable, number of simultaneous connections
controlled by the -m option. By default this is set
to 100. -
-c <command>,
--sh-exec <command> (Execute command via sh)
Same as -e, except it tries to execute
the command via /bin/sh. This means you don't
have to specify the full path for the command, and shell facilities
like environment variables are available.
|
|