NAME

dccserversimulate mIRC's /dccserver command

SYNOPSIS

dccserver [-ehiv] [-n nickname] [-p port]

DESCRIPTION

dccserver aims to provide the functions of mIRC's /dccserver command.

Currently, Chat and Send (including resume) modes are supported. Fserve and Get mode are not yet supported.

All connections are accepted; some simple checks on allowed file names are done. During connectione establishment, there is a 15 seconds timeout; during transfers, it is 2 minutes. Chats have no timeout.

Supported options:

-e
Echo lines input by the user. Useful e.g. if you are using dccserver in an irssi(1) window (see also the -i option and the EXAMPLES section).
-h
Display a short help message.
-i
Do not filter out control characters for color, bold, reverse, and underlined text. Useful if your terminal or wrapper can interpret them.
-n nickname
Set nickname used in handshake to nickname. Should be the same nickname that you use on IRC, otherwise most clients will complain and close the connection. Defaults to “dccserver”.
-p port
Listen for connections on port port. You can specify this argument multiple times to listen on more than one port. If no -p is given, dccserver will listen on port 59, since that is mIRC's default port. Please note that you have to have root privileges to bind to ports below 1024. See SECURITY CONSIDERATIONS below.
-v
Display program name and version number.

After a client has connected, you can send commands to it manually. This is useful for chats or fserves. The syntax is “<nn>: <text>” where “<nn>” is the number of the child, and “<text>” the text you want to send. For example: “0: dir”. Please note that the “:” and the space are necessary.

Text coming from the remote clients will be shown prepended by their nickname and child ID.

You can give dccserver commands by entering one of the following keywords without a child ID in front:

close X
to close the connection with ID X, e.g., close 3.
info
to get an overview of the current connection state.
quit
to close all connections and exit the program.

EXAMPLES

Listen on ports 59 and 37334 as user “yournick”:

dccserver -n yournick -p 59 -p 37334

With irssi(1), you could create the following alias (one line):

/alias DCCSERVER 
 window new hidden; 
 window name dccserver$0; 
 echo dccserver for $N on port $0; 
 exec -name dccserver$0 -nosh -interactive -window dccserver -n $N -p $0 -i -e

and then open a new window with a dccserver inside with “/dccserver 59” for port 59.

SEE ALSO

dccsend(1)

AUTHORS

dccserver was written by Thomas Klausner <tk@giga.or.at>.

BUGS

Get and Fserve modes are not yet supported.

SECURITY CONSIDERATIONS

mIRC's default port is 59. To bind to ports below 1024, one needs root privileges; for this reason dccserver is installed setuid root. To limit damage done in case of trouble, dccserver chroot(2)s itself in the current directory and drops the setuid privileges as soon as possible.

Alternatively, you can remove the setuid bit from dccserver with “chmod u-s /path/to/dccserver” with the limitation that you will only be able to use dccserver on ports above 1024, and you won't get the effect of chroot(2).