Documentation
¶
Index ¶
- func CleanIdent(path string) string
- func ClearLine()
- func ClearScreen()
- func Confirm(s string) bool
- func CopyFile(src, dst string)
- func CreateFlowIdent(srcIP, srcPort, dstIP, dstPort string) string
- func CreateFlowIdentFromLayerFlows(net gopacket.Flow, trans gopacket.Flow) string
- func DecodePort(raw []byte) int32
- func GetBaseLayer(value string) (t gopacket.LayerType)
- func GetDecodeOptions(value string) (o gopacket.DecodeOptions)
- func IsASCII(d []byte) bool
- func ListAllNetworkInterfaces()
- func Pad(in interface{}, length int) string
- func ParseFlowIdent(i string) (srcIP, srcPort, dstIP, dstPort string)
- func Pluralize(name string) string
- func Progress(current, total int64) string
- func ReverseFlowIdent(i string) string
- func StringToTime(val string) time.Time
- func StripQueryString(inputUrl string) string
- func TimeToUTC(val string) string
- func TrimFileExtension(file string) string
- func UnixTimeToUTC(val int64) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Confirm ¶ added in v0.6.6
Confirm displays a prompt message to the terminal and returns a bool indicating the user decision.
func CopyFile ¶ added in v0.6.6
func CopyFile(src, dst string)
CopyFile the source file contents to destination file attributes wont be copied and an existing file will be overwritten.
func CreateFlowIdent ¶ added in v0.6.6
CreateFlowIdent creates a flow identifier string. format: srcIP:srcPort->dstIP:dstPort
func CreateFlowIdentFromLayerFlows ¶ added in v0.6.6
CreateFlowIdentFromLayerFlows creates a flow identifier string. format: srcIP:srcPort->dstIP:dstPort
func DecodePort ¶ added in v0.6.6
DecodePort decodes the network port directly from a byte slice.
func GetBaseLayer ¶ added in v0.3.9
GetBaseLayer resolves a baselayer string to the gopacket.LayerType.
func GetDecodeOptions ¶ added in v0.3.9
func GetDecodeOptions(value string) (o gopacket.DecodeOptions)
GetDecodeOptions resolves a decode option string to the gopacket.DecodeOptions type.
func ListAllNetworkInterfaces ¶ added in v0.4.4
func ListAllNetworkInterfaces()
ListAllNetworkInterfaces dumps a list of all visible network interfaces to stdout.
func ParseFlowIdent ¶ added in v0.6.6
ParseFlowIdent parses the flow identifier. e.g: 192.168.1.47:53032->165.227.109.154:80 will return: 192.168.1.47, 53032, 165.227.109.154, 80 TODO: benchmark and improve performance TODO: IPv6
func ReverseFlowIdent ¶ added in v0.6.6
ReverseFlowIdent reverses the flow identifier. e.g: 192.168.1.47:53032->165.227.109.154:80 will return: 165.227.109.154:80->192.168.1.47:53032 TODO: benchmark and improve performance TODO: IPv6
func StringToTime ¶
StringToTime converts a seconds.micro string to a time.Time.
func StripQueryString ¶ added in v0.6.6
StripQueryString returns an URL without parameters
func TrimFileExtension ¶
TrimFileExtension returns the netcap file name without file extension.
func UnixTimeToUTC ¶ added in v0.6.6
UnixTimeToUTC returns a time string in netcap format to a UTC string.
Types ¶
This section is empty.