Professional Documents
Culture Documents
Objective:
Requirements:
The first requirement of this project is to read and understand the concept of File
Transfer Protocol (FTP) and then develop your own customized version of this protocol.
An FTP has the objective of managing a file repository remotely. Precisely, it can be
used to copy, move, delete, store and transfer files and folders to/from the repository in
a remote manner. It operates according to a client/server model where the client initiates
any of the above-mentioned file operations and the server acts as the remote file host.
The custom-designed protocol should be able to:
1. Upon starting the FTP client, contact must be established with the FTP server using
TCP on port 21. If the connection is successfully established, the client displays a
menu on the screen as follows:
2. If choice [1] is entered, the server would then request from the user to enter a
new username followed by a request to enter a password. Once this is done the
server must store the newly entered username and password in a user credentials
file called userCred.dat. This file is to be loaded first thing every time the
server application is executed. Note that, if the file userCred.dat already
exists, the server must open it. Then, any newly registered user credentials must
be appended to the already existing ones in such a way that each line of the file
will first have a user’s username followed by a semi-colon and the corresponding
password as follows:
Following the registration process, the server must then move to item number 3
described below.
3. Identify the user upon log-in:
a. Server must explicitly request the user to enter his log-in name.
b. Once a log-in name is entered, server must verify the existence and validity
of the entered log-in name:
• If valid, server must then request a password corresponding to
that log-in name.
• If invalid, the server must re-request a valid log-in name for a
number of three times. Failure to enter a valid log-in name causes
the server to terminate the connection.
c. Upon entering a password, server must verify the correctness of the
password:
• If password is valid, server will then request the user to initiate a
file operation.
• If password is invalid, the server will re-request the password for
a number of three times. Failure to enter a correct password will
cause the server to close the connection.
It is worthwhile noting at this stage that data transfers (i.e. upload and download of files)
have to be done over a dedicated TCP data connection on port 20 which different from
the TCP control connection on port 21. Also appropriate return codes have to be returned
and displayed on the client’s screen upon completion/termination of any one of the above
commands as explained in class. Proper exceptions (i.e. errors) must be also captured and
returned to the user.
Deliverables:
1. Well commented Python source code and executable files for the FTP client and
server.
2. Well organized typed report including:
a. A short Introduction.
b. A description of the implemented FTP commands.
c. Important implementation aspects as well as any difficulties encountered
during the implementation process.
d. Ideas and possible extensions for this project that can be classified as future
work.
e. A short conclusion.
3. The above must be presented as both hard copy and soft copy sent through e-mail in
a ZIP file named as: <firstName_LastName_ID_Project2.zip>.
4. A short 10 minutes DEMO of the project online as scheduled by the professor.