While learning HTTP in Detail, I thought it’d be fun to put it to the test in the terminal.

Here’s a quick exercise to practice learning HTTP Requests, Responses and Headers.

  • Difficulty: Easy – new to Linux.
  • Environment: local Debian-based Linux installation e.g. Ubuntu in VirtualBox.
  • Commands: git, python3, cd, mkdir, wget.


Here’s everything you need to do, note, you’ll need two terminals to do this:

  1. Terminal 1: git clone https://github.com/mrashleyball/HTTP.git, cd HTTP
  2. python3 -m http.server
  3. Terminal 2: nc 8000, GET / HTTP/1.1
  4. nc 8000, GET /flag.txt HTTP/1.1
  5. mkdir Downloads, cd Downloads
  6. wget, wget

Wow, pretty easy to spin up web servers and test HTTP Requests, hey?


This is a good exercise to take a step beyond the theory, TryHackMe does a great job with interactive static web pages within their platform.

But I thought it’d be fun to go one step further and test it out within the terminal.

Using the python webserver with netcat, you can clearly see the request making it to the server and it responds with the index.html file, very cool.


And for the flag.txt you simply need to specify the file path to get the response:


For more help, here’s a list of links to helpful guides/articles/forums I used in my research:


This was a really fun little exercise to think up and put together, I love doing mini-projects like this. It combines all the skills I believe are important in tech like writing, teaching and having a grasp on the fundamentals.

“It is important to view knowledge as sort of a semantic tree — make sure you understand the fundamental principles, ie the trunk and big branches, before you get into the leaves/details or there is nothing for them to hang on to.” – Elon Musk.

Thanks for reading and I hope you learned something from this little exercise. This is day 47 of #100DaysOfHacking on the Hackers Learning Path. Subscribe for CyberSec updates or read more, happy hacking.