Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amir-shiati/portscanner
A fast port scanner made using golang.
https://github.com/amir-shiati/portscanner
cli go golang portscan portscanner
Last synced: 6 days ago
JSON representation
A fast port scanner made using golang.
- Host: GitHub
- URL: https://github.com/amir-shiati/portscanner
- Owner: amir-shiati
- License: gpl-3.0
- Created: 2020-03-27T13:46:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T09:28:10.000Z (about 3 years ago)
- Last Synced: 2024-06-19T06:56:18.270Z (5 months ago)
- Topics: cli, go, golang, portscan, portscanner
- Language: Go
- Homepage:
- Size: 4.48 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Portscanner
A fast and simple port scanner created in golang. for times when you are not able to use nmap!# Usage
` Port scanner [-h|--help] -i|--ip "" [-p|--port ""]
[-l|--protocol ""] [-c|--common ""]
[-r|--range ""] [-d|--duration ""]
`
### clone the repo.
`$ git clone https://github.com/amir-shiati/portscanner.git`
### Change directory.
`$ cd portscanner/`
### Give the binary file permission to execute ***if needed***.
`$ chmod -R 775 ./port_scanner`
### Simply run the binary file
`$ ./port_scanner -i 127.0.0.1 -p 80`
#### Oputput
```bash
Scanning port...
Results:
Port:80 State:Open Protocol:tcp```
# Arguments
##### You can do much more here is a list of arguments that you can use:
| Short form of argument (-) | Long form of argument (- -) | Description|
| ------------ | ------------ | ------------ |
| i | ip |***Required*** specifies an ip that you like to scan. must be a valid ip
| p | port | specifies a port that you like to scan. must be a number between '0' and '65535'
| l | protocol |specifies the protocol. must be either 'tcp' or 'udp' ***default value is 'tcp'***
| c | common | if 'true' scans common ports: '0' to '1024' ***default value is 'false'***
| r | range | if 'true' asks for ranges ***default value is 'false'***
| d | duration | duration of connection. must be a value between '7' and '300' ***default value is '10' ***# Examples
#### Command
`$ ./port_scanner -i 127.0.0.1 -c true`
#### Output
```bash
Scanning ports...
Port:80 State:Open Protocol:tcp
Port:443 State:Open Protocol:tcp
Port:444 State:Open Protocol:tcp
Port:631 State:Open Protocol:tcp
Port:902 State:Open Protocol:tcp```
#### Command
`$ ./port_scanner -i 127.0.0.1 -r true`
#### Output
```bash
Enter the firts port number: 0
Enter the seconde port number: 1024
Scanning ports...
Port:80 State:Open Protocol:tcp
Port:443 State:Open Protocol:tcp
Port:444 State:Open Protocol:tcp
Port:631 State:Open Protocol:tcp
Port:902 State:Open Protocol:tcp```
#### Command
`$ ./port_scanner -i 127.0.0.1 -c true -d 15 -l udp
`
##### runs the first example with a 15 seconde connection duration and using udp protocol.### Notice
##### I'm fairly new to the golang world so the code is probably not so well written or efficient!!!