Question: Using Python3 write a socket program to receive arbitrarily large files. Your program will make a socket connection to the host: gaia.cs.umass.edu and send the

Using Python3

write a socket program to receive arbitrarily large files.

Your program will make a socket connection to the host: gaia.cs.umass.edu and send the GET request for the URI: /wireshark-labs/HTTP-wireshark-file3.html. To do this, you will send the following HTTP-compliant GET request to the server exactly as below:

"GET /wireshark-labs/HTTP-wireshark-file3.html HTTP/1.1 Host:gaia.cs.umass.edu "

There is no end-of-transmission (EOT) with sockets, so knowing when youve received all the data can be difficult. Fortunately for this project, the gaia.cs.umass.edu server will close the connection after sending its data, so the easy thing to do is detect when recv or read return

result like the images below

Using Python3 write a socket program to receive arbitrarily large files. Your

program will make a socket connection to the host: gaia.cs.umass.edu and send

Williams-MacBook-Pro:Projects williampfeil$ python lab2.py Request: GET /wireshark-labs/HTTP-wireshark-file3.html HTTP/1.1 Host:gaia.cs.umass.edu (RECV] - length: 4805 HTTP/1.1 200 OK Date: Thu, 13 Feb 2020 23:44:10 GMT Server: Apache/2.4.6 (Centos) OpenSSL/1.0.2k-fips PHP/5.4.16 mod_per1/2.0.11 Perl/v5.16.3 Last-Modified: Thu, 13 Feb 2020 06:59:01 GMT ETag: "1194-59e6f9fb85903" Accept-Ranges: bytes Content-Length: 4500 Content-Type: text/html; charset=UTF-8

Historical Documents: THE BILL OF RIGHTS

THE BILL OF RIGHTS Amendments 1-10 of the Constitution

The Conventions of a number of the States having, at the time of adopting the Constitution, expressed a desire, in order to prevent misconstruction

Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted. |

Amendment IX

The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Amendment X

The powers not delegated to the United States by the Constitution, nor prohibited by it to the states, are reserved to the states respectively, or to the people.

Williams-MacBook-Pro:Projects williampfeil$ Williams-MacBook-Pro:Projects williampfeil$ python lab2.py Request: GET /wireshark-labs/HTTP-wireshark-file3.html HTTP/1.1 Host:gaia.cs.umass.edu (RECV] - length: 4805 HTTP/1.1 200 OK Date: Thu, 13 Feb 2020 23:44:10 GMT Server: Apache/2.4.6 (Centos) OpenSSL/1.0.2k-fips PHP/5.4.16 mod_per1/2.0.11 Perl/v5.16.3 Last-Modified: Thu, 13 Feb 2020 06:59:01 GMT ETag: "1194-59e6f9fb85903" Accept-Ranges: bytes Content-Length: 4500 Content-Type: text/html; charset=UTF-8

Historical Documents: THE BILL OF RIGHTS

THE BILL OF RIGHTS Amendments 1-10 of the Constitution

The Conventions of a number of the States having, at the time of adopting the Constitution, expressed a desire, in order to prevent misconstruction

Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted. |

Amendment IX

The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Amendment X

The powers not delegated to the United States by the Constitution, nor prohibited by it to the states, are reserved to the states respectively, or to the people.

Williams-MacBook-Pro:Projects williampfeil$

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!