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
python ICMPPing.py [the ip or domain name of the destination] [timeout] [times]
- the ip of the destination
- packet length and the delay of each ping
- the maximum delay, minimum delay, average delay
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
-
input the destination
-
input the timeout
- the ip of the destination
- the information which include the index, the reasons of packet returned, the delay, the ip or domain name of the destination (* represents lost or timed packets)
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.
python WebServer.py
- input the port number of the web server
- the information of the request packet will be printed in the commond line
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.
python WebClient.py
- the content of the returned file from the webserver
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
python ProxyServer.py
- input the port number of you proxy server