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.
- Host: GitHub
- URL: https://github.com/whitehatboy005/port-scanner
- Owner: whitehatboy005
- License: mit
- Created: 2024-12-29T07:08:22.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-10T13:23:18.000Z (4 months ago)
- Last Synced: 2025-03-26T13:53:47.485Z (2 months ago)
- Topics: go, gola, port-scan, port-scanner, port-scanning
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# π 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
#

# Example
## βοΈ 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/
```
## UsageYou 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.
#
## Examples1. **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
```
#
## π LicenseThis project is licensed under the terms of the [MIT license](LICENSE.md).