traynetwork

package
v0.0.0-...-fb3f747 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2022 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppendHostsLock = &sync.Mutex{}
View Source
var GlobalScanSemaphore = semaphore.NewWeighted(5)
View Source
var Hosts = []*HostService{}
View Source
var PortsToScan = []uint{22, 80, 443}

var PortsToScan = []uint{1, 20, 21, 22, 23, 25, 80, 443, 8000, 8001, 8080, 8081, 8008, 9000, 16001, 16002}

Functions

func AppendHosts

func AppendHosts(hs []*HostService)

func ArpScan

func ArpScan()

func CidrHosts

func CidrHosts(cidr string) ([]string, error)

func FormatHttpIp

func FormatHttpIp(ip string) string

func Hosts2Json

func Hosts2Json() []byte

func LoadConfig

func LoadConfig()

func MakeNetworkPcMenu

func MakeNetworkPcMenu(hosts []*HostService) (*menu.Node, *menu.Node)

func MakeUserMenu

func MakeUserMenu() *menu.Node

func PortMap

func PortMap() map[int]string

func ScanAllHostsPublicInfo

func ScanAllHostsPublicInfo()

func ScanC

func ScanC()

func ScanConfig

func ScanConfig()

func ScanHostPublicInfo

func ScanHostPublicInfo(host *HostService)

func ScanPort

func ScanPort(ip string, port uint, timeout time.Duration) bool

func ServiceList

func ServiceList() [][]string

func ServiceMap

func ServiceMap() map[string]int

func Ulimit

func Ulimit() int64

func UniqueifyHosts

func UniqueifyHosts()

func UpdatePeers

func UpdatePeers()

func Webserver

func Webserver(apiport, startpageport uint)

Types

type Config

type Config struct {
	HttpPort           uint
	StartPagePort      uint
	Name               string
	MaxUploadSize      uint
	Networks           []string
	KnownPeers         []string
	ArpCheckInterval   int
	PeerUpdateInterval int
}
var Configuration Config

type HostService

type HostService struct {
	Ip       string
	Ports    []uint
	Services []Service
	Name     string
	LastSeen time.Time
}

type HostServiceList

type HostServiceList []*HostService

func (HostServiceList) Len

func (a HostServiceList) Len() int

func (HostServiceList) Less

func (a HostServiceList) Less(i, j int) bool

func (HostServiceList) Swap

func (a HostServiceList) Swap(i, j int)

type InfoStruct

type InfoStruct struct {
	Name     string
	Services []Service
}
var Info InfoStruct

type PortScanner

type PortScanner struct {
	// contains filtered or unexported fields
}

func (*PortScanner) ScanList

func (ps *PortScanner) ScanList(f, l int, timeout time.Duration, ports []uint) (out []uint)

func (*PortScanner) Start

func (ps *PortScanner) Start(f, l uint, timeout time.Duration)

type Service

type Service struct {
	Name        string
	Ip          string
	Port        int
	Protocol    string
	Description string
	Global      bool
	Path        string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL