This is a simple port scanner on golang.
- Golang
All the code is written in golang
I created this project to study the basic work with the net and the net library, as well as to study streams and goroutines.
To run the program, just write run the main.go
file - go run main.go
You can also configure settings such as:
address
- specify the address you need, required field or specify a document (accepts string),first_port
- specify which port the scan will start from, default: 1 (accepts int),last_port
- specify the port to which the scan will take place, default: 1024 (accpet int),max_buffer
- here, specify the number for the goroutine buffer, change it if you understand why, default: 100 (accept int).save_format
- if you want to save the result, then add it in what format, default: none (accepts json, txt),document
- if you need to scan several addresses from a txt file (addresses should be in the column line by line), then specify the path to it, required field or specify a address (accept string).
Launch example for 1 address:
go run main.go --address scanme.nmap.org --first_port 1 --last_port 1024 --max_buffer 100 --save_format json
Launch example for document with address:
go run main.go --document file.txt --first_port 1 --last_port 1024 --max_buffer 100 --save_format json