0

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?

Thank you

2
  • listen and accept. – ctrl-alt-delor Mar 21 '20 at 22:22
  • Please show your code and explain the error clearly: how is it crashing ? – Anonymous Mar 22 '20 at 17:28
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.