Documentation ¶
Index ¶
- func ErrCheck(err error)
- func GetInterfaceIpv4Addr(interfaceName string, ipOverride string) (addr string, err error)
- func GetPacketInfo(packet gopacket.Packet, p *PacketStruct, minimal bool)
- func IpBlacklistFilter(p *PacketStruct, blacklistMap map[string]bool, interfaceAddress string) bool
- func MiniFilter(p *PacketStruct, memoryHashmap map[string]bool) bool
- func PrintHeader(portScanMode bool, separatorCharacter string, minimal bool)
- func PrintPacketInfo(p *PacketStruct, memoryHashmap map[string]bool, ...)
- func StartCapture(inputInterface string, snapshotLen int32, promiscuous bool, ...)
- type PacketStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInterfaceIpv4Addr ¶ added in v1.0.2
Thanks https://gist.github.com/schwarzeni/f25031a3123f895ff3785970921e962c
func GetPacketInfo ¶ added in v1.0.2
func GetPacketInfo(packet gopacket.Packet, p *PacketStruct, minimal bool)
Populate the PacketStruct
func IpBlacklistFilter ¶ added in v1.0.2
func IpBlacklistFilter(p *PacketStruct, blacklistMap map[string]bool, interfaceAddress string) bool
Create a blacklist map of outgoing IP's This is to prevent printing established traffic
For every packet add destination IP to blacklist (unless it's the listening device's IP)
This prevents the response from the remote server to get logged. If the source IP (remote server) matches an IP that has already been a destination then dont log it.
This is to be able to only show connection attempts made from the outside
func MiniFilter ¶
func MiniFilter(p *PacketStruct, memoryHashmap map[string]bool) bool
A basic version of the ignore filter stores all rows for x minutes so duplicates do not get printed
Returns true if srcIpPort and dstIpPort has been seen before
func PrintHeader ¶ added in v1.0.2
Print the header
Types ¶
type PacketStruct ¶ added in v1.0.2
type PacketStruct struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.