scanme

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Scanme is a Go package for network scanning using the GoPacket library. It allows scanning a single IP address for open ports using SYN scans.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

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

The type scanner handles scanning a single IP address and is only shared with the packet injector iface is the interface to send packets on. destination, gateway (if applicable), and source IP addresses to use. opts and buf allow us to easily serialize packets in the send() method.

func NewScanner

func NewScanner(ip net.IP, router routing.Router) (*Scanner, error)

newScanner creates a new scanner for a given destination IP address, using router to determine how to route packets to that IP.

func (*Scanner) Close

func (s *Scanner) Close()

Closes the pcap handle

func (*Scanner) ConnScan added in v1.0.1

func (s *Scanner) ConnScan() (map[layers.TCPPort]string, error)

ConnScan performs a full handshake on each TCP port.

func (*Scanner) Synscan

func (s *Scanner) Synscan() (map[layers.TCPPort]string, error)

Synscan performs a SYN port scan on the specified destination IP address using the provided network interface. It sends SYN packets to ports [1, 65535] and records open ports in a map. The function employs ARP requests, ICMP Echo Requests, and packet capturing to identify open, closed, or filtered ports. The function returns a map of open ports along with their status or an error if any occurs during the scan.

Jump to

Keyboard shortcuts

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