interactshutils

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 9 Imported by: 0

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