Skip to main content

A simple CLI tool to retrieve the N top most used ports

Project description


topmostp

topmostp

Table of Contents

Overview

topmostp (Topmost Ports) is a tool that allows you to quickly retrieve the most used ports. The source of the ranking is the nmap-services in the nmap repo.

At SecSI we found it useful to get this information to use it in a pipeline of scripts.

Install

You can easily install it by running:

pip install topmostp

Usage

topmostp --help

This will display help for the tool. Here are all the switches it supports.

 Usage: topmostp [OPTIONS] COMMAND [ARGS]...                                      
                                                                                  
╭─ Options ──────────────────────────────────────────────────────────────────────╮
│ --help       Show this message and exit.                                       │
╰────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────╮
│ all         Retrieve list of all ports (both TCP, UDP and SCTP) by frequency   │
│ find        Find info about about a specific service                           │
│ sctp        Retrieve list of SCTP ports by frequency                           │
│ stats       Retrieve stats about a port                                        │
│ tcp         Retrieve list of TCP ports by frequency                            │
│ udp         Retrieve list of UDP ports by frequency                            │
│ update      Update ports list                                                  │
╰────────────────────────────────────────────────────────────────────────────────╯

A pratical example is the following:

naabu -p $(topmostp all 15 --silent) -host secsi.io

In this snippet the output of topmostp is used to retrieve the list of the top 10 ports and it is chained with the naabu port scanning tool.

Demo

demo

Credits

Developed by Angelo Delicato @SecSI

License

topmostp is released under the MIT LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topmostp-0.1.6.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

topmostp-0.1.6-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page