Created
November 13, 2025 20:28
-
-
Save iTrooz/2d3749525c16f1d9807d62507b32a0b8 to your computer and use it in GitHub Desktop.
List ports that can be used to
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
| """ | |
| List ports that can be used to connect to this host by dumping incoming connections | |
| After running this command you will need to launch a scan against your host to try to connect to all ports. e.g. with: | |
| nmap -sS -p1-49151 162.38.112.152 | |
| Detected new ports will be shown live and deduplicated | |
| """ | |
| tcpdump 'tcp' -l -nn | stdbuf -oL cut -d' ' -f 3 | stdbuf -oL cut -d'.' -f 5 | stdbuf -oL perl -ne '$|=1; print "$_" unless $seen{$_}++' | tee ports.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment