Skip to main content

Server commands

listen

lethalvoid> listen -h

USAGE
=====
-h to display all options
-y to keep listening even after receiving a connection
listen <port> to listen for connection on port

This lets the server listen for incoming client connections on a specified port. Multiple lethalvoid instances on the same machine cannot listen on the same port at the same time. After using listen, to stop receiving incoming connections, you can use:

lethalvoid> stoplisten

This can also be used to change the port the server listens on.

session

lethalvoid> session -h

USAGE
=====
-h to display all options

session to list all active sessions
session <x> to select a session
session <x-y> "<command>" to run a command on a range of sessions (inclusive)

The session command is used to interface with the connected clients. Without any arguments it can be used to get a list of all connected clients, and some basic information about them.

lethalvoid> session
SESSION ID USER PC VERSION GROUP PING
===============================================================================================================================================
...

It can also be used with a single session ID as input parameter.

lethalvoid> session 0

session 0> ...

This starts a shell for the given session at which point you can start executing session commands on the specified client. To execute a command on multiple clients, you can indicate a range of session ID's and the desired command in the following way:

lethalvoid> session 0-10 ls "C:\\Program Files\\"

This will execute ls on clients with session ID's ranging from 0 to 10 (inclusive) in ascending order. As seen here, the given command does not need to be passed as a single argument surrounded by qoutes.

lpwd

lethalvoid> lpwd

Simply prints the current server's working directory. This is useful since it indicates the base path that files can be uploaded from or downloaded to, among other things. This command can also be used while in a session.

lcd

lethalvoid> lcd <directory>

This change the server's working directory to the specified directory. This command can also be used while in a session.

lls

lethalvoid> lls

Can be used to list the files in the server's current working directory. This command can also be used while in a session.

settimeout

lethalvoid> settimeout -h

USAGE
=====
-h to display all options

settimeout <time in seconds> to set default timeout for new clients (unset is 10 seconds)

This command lets you alter the timeout time connecting clients will be initialized with. To alter the timeout time for an already connected client, execute the settimeout command on the desired client. The timeout time for a client is the maximum amount of time a session command can take before its execution is abandoned. This means if a given command executed on a client takes 40 seconds, and its timeout is set to 30, it will not finish the command and go back to listening to the server for its next command. By default this value is set to 30 seconds.

setheartbeat

lethalvoid> setheartbeat -h

USAGE
=====
-h to display all options

setheartbeat <max response time in ms> <interval in ms> to set max client response time to a heartbeat before being registered as a disconnect (default 1500) and the interval the heartbeat is sent at (default 1000)

As its help message says, this command lets you modify the timing of the hearbeat (or "keepalive") signal for all clients. For bad connections, it can be useful to set a high max response time and a large interval, to prevent false disconnects. While for good connections, it might be better to set a low max response time and small interval to instantly be notified when a client disconnects.