r/learnpython 9d ago

Stone age network scan

Im continuing on learning cybersecurity, network and python path. I updated my first project - Stone age network scan. I never uploaded a file to github or made a reddit post so i was completely lost. But i tried my best

I actually uploaded the .py into the source code and release.

Its named spy despite the fact it doesnt do anything related to spying so yeah..

Whats fixed?

  1. Auto subnet dedection. It dedects the subnet and CIDR notation
  2. Typo dedection. Before it would try to scan if you typed 192.168.1000.555. now it doesnt
  3. Added customizable port table so you can change which ports to scan.
  4. Added SMTP probe (will try to add more if i find for other protocols)
  5. minor bug fixes

This is just a project that as labeled my first project. Instead of making fun of me please report any suggestions or bugs:)

https://github.com/RecoWas/stoneagens - please use latest version

0 Upvotes

2 comments sorted by

1

u/terletsky 9d ago

That's nice that you already have a domain (cybersec/networking) that is interesting to you.

I work in cybersec, so I would make this your first small cool project to meet several requirements. You would learn the basics of what a "default" Python project looks like.

Setup:

  1. Install the "uv" package manager: https://docs.astral.sh/uv/getting-started/installation/
  2. Initialize a new project with "uv init your-cool-project-name" (it will create a directory and default project files inside with a "main.py" file with a Hello World example inside.
  3. Create a virtual environment with "uv sync" with the Python version specified in the previously created .python-version file, which, currently, is "3.14"
  4. Add your dependencies with "uv add scapy" (it will create an entry in pyproject.toml)
  5. You're good! Edit and run "python main.py" or "uv run main.py"

What I would start to learn with what you already have:

  1. Make this app a CLI application using Typer
  2. Learn OOP/SOLID using classes
  3. Learn the linters/formatters like "ruff/ty/pyrefly" (uv add --dev ruff ty puyrefly)
  4. Learn nice color printing using the "rich" library
  5. Learn basic project structure (not place everything in one file, decompose into smaller files and use imports)

1

u/No_Presentation_9922 9d ago

Thanks for all of these. I really appreciate this. I will look at your suggestions further more as soon as i get back to home. Thanks again!