I need to test my nmap script, which crashes when many ports are open. So I need a script (python/bash) that opens n ports on a server.
How could I do that?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Perhaps use netcat(1) (command is
nc) to listen on the ports of interest (it isn't called the swiss army knife of networking for nothing). If any ports are below 1024, you'd need to run it as root.