An open API service indexing awesome lists of open source software.

https://github.com/whitehatboy005/port-scanner

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.
https://github.com/whitehatboy005/port-scanner

go gola port-scan port-scanner port-scanning

Last synced: about 2 months ago
JSON representation

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.

Awesome Lists containing this project

README

        

# 🌐 Port Scanner
[![License](https://img.shields.io/github/license/whitehatboy005/Port-Scanner)](LICENSE.md)

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](https://github.com/user-attachments/assets/b28e743b-4396-4b74-996b-d510205e60e3)
# Example
![Screenshot 2025-01-07 180927](https://github.com/user-attachments/assets/4a145641-0a30-47b4-a243-56bac87fbdae)

## βš™οΈ Installation

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

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

### 🏳️Flags

- `-t `: Target domain or IP address to scan.
- `-s `: Start port number (default: 1).
- `-e `: End port number (default: 10000).
- `-o `: Output file to save the results (default: `results.txt`).
- `-l `: 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`:**

```bash
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:**
```bash
portscan -l domains.txt -s 1 -e 10000 -o results.txt
```
#
## πŸ“ License

This project is licensed under the terms of the [MIT license](LICENSE.md).