tools

package
v0.0.0-...-61bce9c Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomString

func CreateRandomString(len int) string

Types

type EtherTable

type EtherTable struct {
	SrcIp  net.IP  `yaml:"src_ip"`
	Device string  `yaml:"device"`
	SrcMac SelfMac `yaml:"src_mac"`
	DstMac SelfMac `yaml:"dst_mac"`
}

func AutoGetDevices

func AutoGetDevices() (*EtherTable, error)

type Hosts

type Hosts struct {
	IP        string  `json:"ip"`
	Ports     []Ports `json:"ports"`
	Timestamp string  `json:"timestamp"`
}

Hosts masscan hosts output struct

type MasscanResult

type MasscanResult struct {
	Hosts []Hosts `json:"hosts"`
	Ports []Ports `json:"ports"`
}

MasscanResult masscan output struct eg: [ { "ip": "192.168.88.120", "timestamp": "1614306482", "ports": [ {"port": 80, "proto": "tcp", "status": "open", "reason": "syn-ack", "ttl": 51} ] } ]

func ParseJson

func ParseJson(content []byte) (*MasscanResult, error)

ParseJson Parse takes a byte array of masscan json data and unmarshals it into a MasscanResult struct.

type Ports

type Ports struct {
	Port   int    `json:"port"`
	Proto  string `json:"proto"`
	Status string `json:"status"`
	Reason string `json:"reason"`
	TTL    int    `json:"ttl"`
}

Ports masscan ports output struct

type SelfMac

type SelfMac net.HardwareAddr

Jump to

Keyboard shortcuts

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