This assignment asks you to develop a basic File Transfer Protocol (FTP) application that transmits files between a client and a server using Python.Your programs should implement four FTP commands: (1) change directory(cd), (2) list directory content (ls), (3) copy a file from client to a server (put) and (4) copy a file from a server to a client (get). The project will be completed in two phases. In the first phase, all students will implement two versions of the program: one that uses stock TCP1for reliable data transfer; and one that implements stop-and-wait reliability at the application layer and uses UDP for transport. In the second phase, graduate students will be asked to evaluate and compare the stock TCP and the stop-and-wait implementations using Wireshark. Undergraduate students can attempt the second phase of the assignment for extra credit.
Objectives:
There are a number of objectives to this assignment. The first is to make sure you have some experience developing a network-based socket application. Second, because you are allowed to use any references you find on the Internet (including copies of existing code!), this assignment will help you see just how many network programming aids are available. Third, you will get a first-hand experience in comparative evaluation of protocol performance. Finally, having just a bit of practical experience will put alot of the protocol concepts we learn into perspective.
File naming conventions: Pay attention to the file naming directions carefully. Make sure that you name your files and format your messages as specified in the assignment. An automated program will be used for grading and if there are any deviations, you will lose points!
Client using TCP:
client_tcp.py
Server using TCP:
server_tcp.py
Client using UDP:
client_udp.py
Sever using UDP:
server_udp.py
Please code this in python!
To change the directory
os.chdir("/path/to/change/to")
List directory and content:
ftp.retrlines('LIST')
Copy a file from file to server get:
import subprocess
p= subprocess.Popen(["scp,"my_file.text","username@server:path"])
sts=os.waitpid(p.pid,0)
Copy a file from server put:
from vassal.terminal import Terminal
shell=Terminal (["scp username@host:/home/foo.text])
shell.run()
note- it will save your authenticate credential and need not to type againg and again
Get Answers For Free
Most questions answered within 1 hours.