internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//START 开始 3秒的计时器
	START = "start"
	//END 结束
	END = "end"
)

Variables

This section is empty.

Functions

func ParseMdns

func ParseMdns(data []byte) string

ParseMdns 参数data 开头是 dns的协议头 0x0000 0x8400 0x0000 0x0001(ans) 0x0000 0x0000 从 mdns响应报文中获取主机名

func ParseNBNS

func ParseNBNS(data []byte) string

ParseNBNS 也是一个种常见的查看目标机器hostname的一种协议,和mDNS一样,传输层也是UDP,端口是在137。

func PrintData

func PrintData()

PrintData 格式化输出结果 xxx.xxx.xxx.xxx xx:xx:xx:xx:xx:xx hostname manuf xxx.xxx.xxx.xxx xx:xx:xx:xx:xx:xx hostname manuf

func Reverse

func Reverse(s string) (result string)

反转字符串

func Scan

func Scan(interfaceName string)

Scan 扫描

Types

type Buffer

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

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) PrependBytes

func (b *Buffer) PrependBytes(n int) []byte

type IP

type IP uint32

func ParseIP

func ParseIP(b []byte) IP

[]byte --> IP

func ParseIPString

func ParseIPString(s string) IP

string --> IP

func Table

func Table(ipNet *net.IPNet) []IP

根据IP和mask换算内网IP范围

func (IP) String

func (ip IP) String() string

将 IP(uint32) 转换成 可读性IP字符串

type IPSlice

type IPSlice []IP

IPSlice ,实现了sort的排序接口

func (IPSlice) Len

func (ip IPSlice) Len() int

func (IPSlice) Less

func (ip IPSlice) Less(i, j int) bool

func (IPSlice) Swap

func (ip IPSlice) Swap(i, j int)

type Info

type Info struct {
	// IP地址
	Mac net.HardwareAddr
	// 主机名
	Hostname string
	// 厂商信息
	Manuf string
}

Info 扫描到的信息

Jump to

Keyboard shortcuts

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