Documentation ¶
Index ¶
- func PrettyPrintScanResults(results map[uint16]string, services map[uint16]string)
- func ProcessCapturedPacket(handle *pcap.Handle, srcIP, dstIP net.IP, srcPort, dstPort uint16, ...) (string, error)
- func Scan(srcIP, dstIP net.IP, ports []uint16, timeout time.Duration) (map[uint16]string, error)
- func SendSYNPacket(packetData []byte, srcIP, dstIP net.IP) error
- func StartPacketCapture(srcIP, dstIP net.IP, srcPort, dstPort uint16) (*pcap.Handle, func(), error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyPrintScanResults ¶
func ProcessCapturedPacket ¶ added in v0.3.4
func ProcessCapturedPacket(handle *pcap.Handle, srcIP, dstIP net.IP, srcPort, dstPort uint16, timeout time.Duration) (string, error)
ProcessCapturedPacket processes the captured packet and returns the status of the connection.
func Scan ¶
Scan performs a SYN scan on the given source and destination IP addresses and ports. It sends a SYN packet to each destination port and waits for a response. The function returns a map of port statuses, where the key is the port number and the value is the status ("open", "closed", "filtered", or "error"). The scan will timeout after the specified duration.
func SendSYNPacket ¶
SendSYNPacket sends a raw TCP SYN packet with the provided packet data, source IP, and destination IP. It creates a raw socket, binds it to the appropriate network interface, and sends the packet using the socket. This function is used to initiate a TCP connection by sending a SYN packet.
Types ¶
This section is empty.