computer_network_lab

Include ICMP, Traceroute, web server, web proxy ....

View the Project on GitHub

Please visit the introduction here: A beautiful readme web

This one include some experiments, icmp, traceroute, webserver, webproxy, of the computer network lecture.


These scripts are based on python 3.5.2

icmp:

how to use?

python ICMPPing.py [the ip or domain name of the destination] [timeout] [times]

result?

icmp



traceroute:

how to use?

please close the firewall, because the firewall will drop the useless packets, which is returned by ttl equal 0 or other bad reasons.

python Traceroute.py
  1. input the destination

  2. input the timeout

result?

traceroute



webserver:

you can input localhost:xxxx/filePathOfTheWebsite or 127.0.0.1:xxxx/filePathOfTheWebsite in the Browser address bar

the ‘xxxx’ is the port number of the webserver, the ‘filePathOfTheWebsite’ is the path of your website file

if you do not input any path, the browser will open the ‘index.html’ file.

if you input a nonexistent path, the browser will open the ‘404.html’ file.

how to use?

python WebServer.py

  1. input the port number of the web server

result?

webserver



webclient

this one only can connect to the 8000 port, if you need to connect to other port number, please modify this one.

the webclient will request a website from the webserver about every 2 seconds.

how to use?

python WebClient.py

result?


webproxy:

set you proxy address(127.0.0.1) and the proxy port number

use browser to visit some website

this script does not support https, but it can use in put, get, put, patch and delete request

if you want to access your local server using a proxy, use your IP instead of localhost or 127.0.0.1

how to use?

python ProxyServer.py
  1. input the port number of you proxy server

result?