Files
004_comission/hk1234566/python_networking/new/test.sh
louiscklaw 866bfd3b42 update,
2025-01-31 19:51:47 +08:00

32 lines
713 B
Bash

#!/usr/bin/env bash
set -ex
# python ./NetworkApplications.py -h
# test web
# python ./NetworkApplications.py w
# curl http://localhost:8080/index.html
# test ParisTraceroute
# sudo su
# python ./NetworkApplications.py pt www.google.com
# test ping
# python ./NetworkApplications.py p www.google.com
# test traceroute
# traceroute -I www.google.com
# paris-traceroute -I www.google.com
# python ./NetworkApplications.py t www.google.com
# test proxy
# python ./NetworkApplications.py x
# curl neverssl.com --proxy 127.0.0.1:8000
# curl http://neverssl.com --proxy 127.0.0.1:8000
# curl https://neverssl.com:443 --proxy 127.0.0.1:8000
# utils
# gethostbyname
# python ./NetworkApplications.py p localhost