Skip to content

This project is a simple command-line tool written in Go that scans ports on a target domain or IP address. It can scan a range of ports, check which ports are open, and record the results to an output file. It also supports scanning a list of domains from a file.

License

Notifications You must be signed in to change notification settings

whitehatboy005/Port-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Port Scanner

License

This project is a simple command-line tool written in Go that scans ports on a target domain or IP address. It can scan a range of ports, check which ports are open, and record the results to an output file. It also supports scanning a list of domains from a file.

Features

  • Port Scanning: Scan a specific range of ports on a target domain or IP address.
  • Service Detection: Identifies common services running on open ports such as FTP, HTTP, SSH, etc.
  • Domain List Scanning: Scan multiple domains from a list stored in a file.
  • Output to File: Save results to a file in a readable format.
  • Parallel Scanning: Uses goroutines to scan multiple ports concurrently for faster results.
  • Custom Port Range: Specify custom port ranges for focused and efficient scans.
  • Cross-Platform Compatibility: Compatible with Windows, Linux, and macOS.
  • Timeout Handling: Configurable timeouts for slow or unresponsive networks.

Requirements

  • Go 1.18 or higher

Screenshot 2025-01-07 180942

Example

Screenshot 2025-01-07 180927

Installation

  1. Clone the repository to your local machine:
    git clone https://github.com/whitehatboy005/Port-Scanner.git
  2. Navigate to the project directory:
    cd Port-Scanner
  3. Build the project:
    go build -o portscan portscan.go
  4. Make it executable
    sudo chmod +x portscan
  5. Move the binary to /usr/local/bin for global access
    sudo mv portscan /usr/local/bin/

Usage

You can run the port scanner using the following command-line flags:

Flags

  • -t <target>: Target domain or IP address to scan.
  • -s <start port>: Start port number (default: 1).
  • -e <end port>: End port number (default: 10000).
  • -o <output file>: Output file to save the results (default: results.txt).
  • -l <file>: File with a list of domains to scan.
  • -h: Display help menu.

Examples

  1. Scan a single target (example: google.com) from port 1 to 10000 and save the results to results.txt:

    portscan -t google.com -s 1 -e 10000 -o results.txt
  2. Scan a list of domains from domains.txt file from port 1 to 10000 and save the results to results.txt:

    portscan -l domains.txt -s 1 -e 10000 -o results.txt

License

This project is licensed under the terms of the MIT license.

About

This project is a simple command-line tool written in Go that scans ports on a target domain or IP address. It can scan a range of ports, check which ports are open, and record the results to an output file. It also supports scanning a list of domains from a file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages