-
-
Save burningTyger/ce9c13fa464ac3893a28 to your computer and use it in GitHub Desktop.
Test outgoing open ports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
task(){ | |
LC_ALL=C nc -vzw5 portquiz.net $1 2>&1 | grep -v 'Connection timed out' | |
} | |
N=50 # Specify number of ports to check at once | |
( | |
for port in {1..65535}; do # Specify port range to check here | |
((i=i%N)); ((i++==0)) && wait | |
task "$port" & | |
done | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment