Lion Cipher Lab

Write a small Python TCP checker for your own host: timeouts, banners, JSON output, and a rate limit

Why it matters

Anyone doing authorized testing ends up writing small scripts, because tools do not always fit the job. A TCP connect check is the smallest useful one: it shows what a host exposes. Writing it yourself teaches what the big tools do for you: timeouts, parallelism, results you can process and limits that stop you from hurting a fragile network. It also teaches the habit that matters most: the script should refuse targets outside your scope, in code, so a typo cannot turn a check of your own machine into a probe of someone else's.

What you'll learn

Steps in this lab

  1. The authorization rule, built into the code
  2. Start some things to find
  3. Write the first version: threads, timeout, banner, JSON
  4. Run it on your own host and read the result
  5. Break the scope guard on purpose
  6. Adapt it: read targets from a file
  7. Rate limiting, and being a good neighbour
  8. What a professional does differently, and when not to run this
  9. What a defender would see, and the fix
  10. Clean up

Open the full interactive lab →

Keep learning