Last active
April 20, 2025 11:31
-
-
Save komodoooo/38e1c1fc32e38eb3f0990f052538c708 to your computer and use it in GitHub Desktop.
Get shodan's top 1000 ports in a parsable way
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
shodan stats --facets port:1000 net:0.0.0.0/0 > tmp.txt | |
python3 -c 'open("ports.txt", "w").write("\n".join([i.split()[0] for i in open("tmp.txt", "r").read().strip().splitlines()[1:]]))' | |
rm tmp.txt # these ports are probably all TCP due to its popularity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment