Can't you listen on a port range with netcat? You can scan a range, but not listen it appears. So only solution is scripting?
I know this post is old, but I recently found a decent solution for this in the form of a nice one-liner. Shell = bash, OS = Redhat 7.
for j in 202{0..5}; do nc -lvnp $j & done
This should open up a number of listening ports from 2020 to 2025, or whatever range you want.
If you are not a root user but a sudoer and have to listen to ports below 1024 add sudo
before nc
command.
for j in 101{0..5}; do sudo nc -lvnp $j & done
Edited : n/c: The local port parameter was missing. {-p}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With