hpot

package module
v0.0.0-...-81acc26 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

Go Reference Go Report Card Tests GitHub go.mod Go version GitHub

hpot

hpot is a command line tool for running a honeypot server.

Here's how to install it:

go install github.com/qba73/hpot/cmd/hpot@latest

To run it:

Start HPot

hpot 8091,8092,8093

Send a request

curl http://localhost:8091
curl: (56) Recv failure: Connection reset by peer

Verbose mode

To see more information about incoming connections, use the -v flag:

hpot -v 8091,8092,8093
Starting listener on: [::]:8091
Starting listener on: [::]:8092
Starting listener on: [::]:8093

Send a request

curl http://localhost:8091
Incomming connection from:  127.0.0.1:53771

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main() int

Types

type Pot

type Pot struct {
	Verbose   bool
	AdminPort int
	Ports     []int

	Log slog.Logger
	// contains filtered or unexported fields
}

Pot represents a Honeypot.

func NewHoneyPotServer

func NewHoneyPotServer() *Pot

NewHoneyPotServer returns default, unstarted HoneyPot configured to listen for admin connections on port 8085.

func (*Pot) ListenAndServe

func (p *Pot) ListenAndServe() error

ListenAndServe listens on the TCP network address addr on admin port and for upcoming network connections then calls serve with handler to handle requests on incoming connections on given ports.

func (*Pot) NumConnections

func (p *Pot) NumConnections() int

NumConnections returns number of attempted connections to the Pot.

func (*Pot) OpenPorts

func (p *Pot) OpenPorts() []int

OpenPorts returns the ports Pot is listening on.

func (*Pot) Records

func (p *Pot) Records() []net.Addr

Records returns remote addresses representing incoming connections.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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