Skip to main content

Simple CLI port scanner

Project description

port-eye

Build Status codecov code style License: MIT

Simple CLI wrapper around nmap to perform port scanning in Python

Note: This software is indended for legitimate use only.

Features

  • Scanning of IPV4, IPV6 hosts and CIDR blocks.
  • Parsing of hosts from input file.
  • Automated generation of reports in HTML format.
  • Parallel scanning for increased performance.
  • Optional Docker-based execution.

Example command:

$ port-eye -t 127.0.0.1 -o report.html

Output html file example:

Example output

Installation

This application is compatible with Python 2.7 and Python 3.5+.

Docker installation

If you have Docker installed, you can pull the image from Docker-Hub:

docker pull ahugues/port-eye

You can also build the image by cloning the repository and running:

docker build -t port-eye .

Prerequisites

You need to install nmap on your machine for the application to work (unless you choose the Docker install.)

Example on Ubuntu:

sudo apt update
sudo apt install nmap

Example on Arch

sudo pacman -S nmap

Example on Mac with Homebrew

brew install nmap

Install with pypi

If you have Python 2.7 or 3.5+ installed, you can install port-eye from PyPI:

pip install port-eye

or locally by clonning the repository and running:

pip install .

Usage

General notes

port-eye exposes a command line executable named port-eye

When run without any option, port-eye will simply display the help message.

Input hosts can be inputed from the CLI with the option -t or --target. Inputted hosts can be IPV4 and 6 as well as CIDR blocks.

Hosts can be added from an input file in which hosts are put line by line. Example:

127.0.0.1
::1
8.8.8.8

If using Docker, and assuming you are working in a certain directory, you can run a port-eye container using:

docker run -v "$(pwd)":/files port-eye <options>

Or if built locally

docker run -v "$(pwd)":/files port-eye <options>

CLI reference

Usage: port-eye [OPTIONS]

  Run the main application from arguments provided in the CLI.

Options:
  -t, --target TEXT   Target host (IPV4, IPV6 or CIDR
  -f, --file PATH     File containing the hosts to check
  -o, --output PATH   Output HTML file into which the results must be stored
                      [required]
  -s, --sudo          Run nmap as privileged user for more accurate scanning
  -d, --debug         Display debug information to the terminal
  -m, --mock          Use mock API instead of really running nmap
  -j, --jobs INTEGER  Max number of concurrent scans (default 4)
  -h, --help          Show this message and exit.

Contributing

Contributions are closed at the moment.

License

MIT

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

port-eye-0.2.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

port_eye-0.2.1-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file port-eye-0.2.1.tar.gz.

File metadata

  • Download URL: port-eye-0.2.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for port-eye-0.2.1.tar.gz
Algorithm Hash digest
SHA256 090a6012fbbfeac1306e75b523d7c1c73b2348fdbf03d2d4e46b165238c01ce4
MD5 95505c0fe5406cbd8cb8359c07bbc7d5
BLAKE2b-256 b701830ccb0bbf528bf3a9fb56ca81e4ccf00272149717ce227878de7ffb1b31

See more details on using hashes here.

File details

Details for the file port_eye-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: port_eye-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for port_eye-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41ba441f28f79d71b7f92d0affa21af8f5079dafef77e02977323a63ee27497a
MD5 6de39502b1a7ea84288aa7be6a6c8f6e
BLAKE2b-256 fdba050deaf7a1a1f76357c9fc752e0e7e84f6df02207c99291eb912f25ced1a

See more details on using hashes here.

Supported by

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