dddd/lib/gonmap/gonmap_test.go
SleepingBag945 01e7d0b159 dddd
2023-08-18 08:55:46 +02:00

26 lines
730 B
Go
Executable File

package gonmap
import (
"fmt"
"testing"
"time"
)
func TestScan(t *testing.T) {
var scanner = New()
host := "192.168.100.144"
port := 5001
status, response := scanner.ScanTimeout(host, port, time.Second*30)
fmt.Println(status, response.FingerPrint.Service, host, ":", port)
port = 22
status, response = scanner.ScanTimeout(host, port, time.Second*30)
fmt.Println(status, response.FingerPrint.Service, host, ":", port)
port = 5000
status, response = scanner.ScanTimeout(host, port, time.Second*30)
fmt.Println(status, response.FingerPrint.Service, host, ":", port)
port = 445
status, response = scanner.ScanTimeout(host, port, time.Second*30)
fmt.Println(status, response.FingerPrint.Service, host, ":", port)
}