Playing with ncat and Python http.server
Par Nicolas, mercredi 26 juillet 2017 à 15:41 :: geek stuff :: #510 :: rss
- open a webserver and browse
python3 -m http.server 8080
- open a listening socket on port 9000
ncat -l 9000
- upon browser call at localhost:9000 - see the HTTP GET request come in and answer it as follows :
HTTP/1.1 307 Temporary Redirect Location: https://www.eff.org/
HTTP/1.1 200 OK Content-length: 10 Content-type: text/plain
1234567890
- see 1234567890 print in the browser
Commentaires
Aucun commentaire pour le moment.
Ajouter un commentaire
Les commentaires pour ce billet sont fermés.