Chetan2002143/pymap ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python command line network scanner that I can run on my own machines and local network.

I want it to take a target like an IP, hostname, subnet, range, or a list of addresses, then scan ports, discover which hosts are up, identify basic services and versions, and give a rough OS guess. It should support a normal TCP scan by default, plus UDP scanning, a faster stealth style scan if raw sockets are available, and a ping sweep mode. I also want simple timing options so I can choose between slower and faster scans, and the ability to skip host discovery when needed.

Please include useful output options, like normal text, greppable text, and JSON saved to a file. Keep it built mostly with the Python standard library, but if it helps, add optional scapy support for the raw socket features. Make it work as both a CLI tool and something I could import from Python. Please include a few examples and basic tests too.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab