Skip to content

A network utility library for scanning / finding devices on a network. Implements port scanning, upnp, zeroconfig etc.

License

Notifications You must be signed in to change notification settings

Oleaintueri/gophorus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gophorus

GitHub GitHub go.mod Go version GitHub tag (latest SemVer)

A really fast network utility library for scanning network devices.

Features:

  • Port Scanning
  • UPnP (ssdp)

Build with ❤️ by

Oleaintueri is sponsoring the development and maintenance of this project within their organisation.

Getting started

Installation

GO111MODULE=on go get github.com/Oleaintueri/gophorus

Usage

package main

import (
	"fmt"
	"github.com/Oleaintueri/gophorus/internal/pkg/ports"
	"github.com/Oleaintueri/gophorus/pkg/gophorus"
)

func main() {
	// A singular IP to scan
	gp, err := gophorus.NewPortScanner("192.168.0.1",
		ports.WithReturnOnlyOpen(true),
		ports.WithPorts([]int{
			443,
			8000,
			9000,
		}))

	// Scan an entire cidr
	gp, err = gophorus.NewPortScanner("192.168.0.1",
		ports.WithEntireCidr(true),
		ports.WithReturnOnlyOpen(true),
		ports.WithTimeout(2000),
		ports.WithProtocol(ports.PROTOCOL_TCP),
		ports.WithPorts([]int{
			80,
			443,
			8000,
			9000,
		}))

	if err != nil {
		panic(err)
	}

	devices, err := gp.Scan()

	if err != nil {
		panic(err)
	}

	for i := range devices {
		fmt.Printf("Device: %v", devices[i])
	}
}

Other Resources

About

A network utility library for scanning / finding devices on a network. Implements port scanning, upnp, zeroconfig etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages