Implementing an FTP server and client Amod Mulay id# 109017301
Notes:
- These scripts are designed to be used with python3 (version 3.3.1) and will NOT work with python2. The scripts have been tested on a linux host. It is possible that some commands will not work on a windows host because of difference in path conventions.
- The server script assumes that it has maxClient no. of sockets free consecutively starting from serverPortBase
- The "server exit" command is broken for the multi-threaded version of the scripts
- The maximum number of supported clients can be specified by modifying the maxClient variable (default set to 5)
- The current multi-threading implementation is very crude, inefficient and not secure
- username/password has been implemented but it is very crude. It only acts for authentication but is very poor in terms of security since passwords are stored and tranmitted in cleartext
- All the extra credit work except seperate socket/port for data has been implemented
- Data transfer takes place in 1KB buffers and hence might take some time for very large files.
- The server and client scripts are located in thier respective directories so obviously you have to navigate(cd) to those directories to execute the scripts.
USAGE INSTRUCTIONS
- ./FTPserver.py #assumes that /usr/bin/python points to python3 binary or run "python3 TCPServer.py ". is an optional argument and defaults to 13000. eg. "./FTPserver.py 13010"
- "./FTPclient.py " or "python3 TCPClient.py ". and are optional arguments and default to "localhost" and 13000 respectively. eg."./FTPclient.py 127.0.0.1 13010" OR "./FTPclient.py 127.0.0.1" which will use the default port 13000.
- enter multiple commands as you wish. To see a list of supported commands type "help"
- to exit client type "quit" or "bye"
- you can try using the client script from multiple machines but the sever ip has to be specified( default is localhost)
List of supported commands
- help : brings up help menu
- server exit : exits both server and client processes
- get : gets from server
- put : puts to server
- list : lists the contents of working directory at server
- cd : changes working directory to
- bye / quit : Either of the commands can be used to exit client