File Server

 

The mIRC fileserver allows other users to access files on your hard disk and is therefore dangerous since if used improperly it will allow them to access private/confidential information.

 

The /fserve command

A fileserver is initiated by using the /fserve command which initiates a DCC Chat to the specified user. You must specify a homedirectory. The user will be limited to accessing only files and directories within this homedirectory. The format is:

 

/fserve <nickname> <maxgets> <homedirectory> [welcomefile]

 

The maxgets is the maximum number of simultaneous dcc gets that a user can have during a fileserver session.

 

The welcome file is a text file that is sent to the user when they first connect. For example:

 

/fserve goat 5 c:\users\level1 level1.txt

 

This will initiate a filserver session to user goat with his homedirectory as c:\users\level1 and will send goat the text in the level1.txt file (presumably informing him that he is a level1 user and what files he can access etc.). The user can only have 5 simultaneous gets.

 

In each directory, you can place a dirinfo.srv file which describes that directory. Each time the user performs a CD to change into a directory, mIRC will look for this file and if it finds it, the text in it will be sent to the user.

 

Fileserver commands

The commands available to a user connected to your fileserver are:

 

cd <directory> - change to the specified directory.

 

dir [-b|k] [-#] [/w] - lists the name and size of each file in the current directory. The /w switch forces a wide listing. The [-b|k] selects bytes or k's. The [-#] specifies the number of files on each line in a horizontal listing.

 

ls [-b|k] [-#] - lists the name of each file in the current directory using a wide listing.

 

get <filename> - asks the fileserver to DCC Send the specified file.

 

read [-numlines] <filename.txt> - reads the specified text file. The user will be sent a default of 20 lines and then prompted whether to continue listing. The -numlines option changes the default number of lines to a value between 5 and 50.

 

help - lists the available commands.

 

exit or bye - terminates the connection.

 

Note:

1. If a directory has a large number of files try to split them up into subdirectories, this will improve performance.

2. If a user is idle for too long the fileserver will automatically close the connection. You can set the idle time out in the DCC Options dialog.

3. A user is limited to opening a single fileserver session at any one time. If mIRC initiates a fileserver session to a user and that user does not respond then the fileserver session will have to time-out and close before that user can ask for another session.