interactshutils

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 10 * time.Second
)

Variables

View Source
var (
	ErrInteractshClientNotInitialized = errors.New("interactsh client not initialized")
)

Functions

func DefaultDnsMatcher

func DefaultDnsMatcher(interactions *server.Interaction) bool

func DefaultHttpMatcher

func DefaultHttpMatcher(interactions *server.Interaction) bool

Types

type Client

type Client struct {
	sync.Once
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(options *Options) (*Client, error)

New returns a new interactsh server client

func (*Client) Close

func (c *Client) Close()

func (*Client) NewURL

func (c *Client) NewURL() (string, error)

func (*Client) ResultEventCallback

func (c *Client) ResultEventCallback(id string, data *RequestData, timeout time.Duration)

type Options

type Options struct {
	ServerURL           string
	Token               string
	HTTPClient          *retryablehttp.Client
	CacheSize           int
	Eviction            time.Duration
	PollDuration        time.Duration
	DisableHttpFallback bool
}

func DefaultOptions

func DefaultOptions(httpClient *retryablehttp.Client) *Options

type RequestData

type RequestData struct {
	MatchFunc   func(interactions *server.Interaction) bool
	ExtractFunc func(interactions *server.Interaction) []string
	// contains filtered or unexported fields
}

func NewDefaultDNSMatcherRequestData

func NewDefaultDNSMatcherRequestData() *RequestData

func NewDefaultHTTPMatcherRequestData

func NewDefaultHTTPMatcherRequestData() *RequestData

func NewRequestData

func NewRequestData(matchFunc func(interactions *server.Interaction) bool, extractFunc func(interactions *server.Interaction) []string) *RequestData

func (*RequestData) Result

func (r *RequestData) Result() (bool, []string)

Jump to

Keyboard shortcuts

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