modules

package
v0.0.0-...-ab9e86a Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: GPL-3.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(c *gin.Context, optMsg ...string)

func ClearRestEvents

func ClearRestEvents(c *gin.Context)

func RunRestCommand

func RunRestCommand(c *gin.Context)

func SafeBind

func SafeBind(c *gin.Context, obj interface{}) error

func SecurityMiddleware

func SecurityMiddleware() gin.HandlerFunc

func ShowRestEvents

func ShowRestEvents(c *gin.Context)

func ShowRestSession

func ShowRestSession(c *gin.Context)

func TLSConfigFromCA

func TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *goproxy.ProxyCtx) (*tls.Config, error)

Types

type APIResponse

type APIResponse struct {
	Success bool   `json:"success"`
	Message string `json:"msg"`
}

type ArpSpoofer

type ArpSpoofer struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewArpSpoofer

func NewArpSpoofer(s *session.Session) *ArpSpoofer

func (ArpSpoofer) Author

func (p ArpSpoofer) Author() string

func (*ArpSpoofer) Configure

func (p *ArpSpoofer) Configure() error

func (ArpSpoofer) Description

func (p ArpSpoofer) Description() string

func (ArpSpoofer) Name

func (p ArpSpoofer) Name() string

func (*ArpSpoofer) Start

func (p *ArpSpoofer) Start() error

func (*ArpSpoofer) Stop

func (p *ArpSpoofer) Stop() error

type ByAddressSorter

type ByAddressSorter []*net.Endpoint

func (ByAddressSorter) Len

func (a ByAddressSorter) Len() int

func (ByAddressSorter) Less

func (a ByAddressSorter) Less(i, j int) bool

func (ByAddressSorter) Swap

func (a ByAddressSorter) Swap(i, j int)

type ByRcvdSorter

type ByRcvdSorter []*net.Endpoint

func (ByRcvdSorter) Len

func (a ByRcvdSorter) Len() int

func (ByRcvdSorter) Less

func (a ByRcvdSorter) Less(i, j int) bool

func (ByRcvdSorter) Swap

func (a ByRcvdSorter) Swap(i, j int)

type BySeenSorter

type BySeenSorter []*net.Endpoint

func (BySeenSorter) Len

func (a BySeenSorter) Len() int

func (BySeenSorter) Less

func (a BySeenSorter) Less(i, j int) bool

func (BySeenSorter) Swap

func (a BySeenSorter) Swap(i, j int)

type BySentSorter

type BySentSorter []*net.Endpoint

func (BySentSorter) Len

func (a BySentSorter) Len() int

func (BySentSorter) Less

func (a BySentSorter) Less(i, j int) bool

func (BySentSorter) Swap

func (a BySentSorter) Swap(i, j int)

type CommandRequest

type CommandRequest struct {
	Command string `json:"cmd"`
}

type DHCP6Spoofer

type DHCP6Spoofer struct {
	session.SessionModule
	Handle     *pcap.Handle
	DUID       *dhcp6opts.DUIDLLT
	DUIDRaw    []byte
	Domains    []string
	RawDomains []byte
	Address    net.IP
}

func NewDHCP6Spoofer

func NewDHCP6Spoofer(s *session.Session) *DHCP6Spoofer

func (DHCP6Spoofer) Author

func (s DHCP6Spoofer) Author() string

func (*DHCP6Spoofer) Configure

func (s *DHCP6Spoofer) Configure() error

func (DHCP6Spoofer) Description

func (s DHCP6Spoofer) Description() string

func (DHCP6Spoofer) Name

func (s DHCP6Spoofer) Name() string

func (*DHCP6Spoofer) Start

func (s *DHCP6Spoofer) Start() error

func (*DHCP6Spoofer) Stop

func (s *DHCP6Spoofer) Stop() error

type DNSSpoofer

type DNSSpoofer struct {
	session.SessionModule
	Handle  *pcap.Handle
	Domains []string
	Address net.IP
	All     bool
}

func NewDNSSpoofer

func NewDNSSpoofer(s *session.Session) *DNSSpoofer

func (DNSSpoofer) Author

func (s DNSSpoofer) Author() string

func (*DNSSpoofer) Configure

func (s *DNSSpoofer) Configure() error

func (DNSSpoofer) Description

func (s DNSSpoofer) Description() string

func (DNSSpoofer) Name

func (s DNSSpoofer) Name() string

func (*DNSSpoofer) Start

func (s *DNSSpoofer) Start() error

func (*DNSSpoofer) Stop

func (s *DNSSpoofer) Stop() error

type Discovery

type Discovery struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewDiscovery

func NewDiscovery(s *session.Session) *Discovery

func (Discovery) Author

func (d Discovery) Author() string

func (*Discovery) Configure

func (d *Discovery) Configure() error

func (Discovery) Description

func (d Discovery) Description() string

func (Discovery) Name

func (d Discovery) Name() string

func (*Discovery) Show

func (d *Discovery) Show(by string) error

func (*Discovery) Start

func (d *Discovery) Start() error

func (*Discovery) Stop

func (d *Discovery) Stop() error

type EventsStream

type EventsStream struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewEventsStream

func NewEventsStream(s *session.Session) *EventsStream

func (EventsStream) Author

func (s EventsStream) Author() string

func (*EventsStream) Configure

func (s *EventsStream) Configure() error

func (EventsStream) Description

func (s EventsStream) Description() string

func (EventsStream) Name

func (s EventsStream) Name() string

func (*EventsStream) Show

func (s *EventsStream) Show() error

func (*EventsStream) Start

func (s *EventsStream) Start() error

func (*EventsStream) Stop

func (s *EventsStream) Stop() error

func (*EventsStream) View

func (s *EventsStream) View(e session.Event, refresh bool)

type HTTPProxy

type HTTPProxy struct {
	Name        string
	Address     string
	Server      http.Server
	Redirection *firewall.Redirection
	Proxy       *goproxy.ProxyHttpServer
	Script      *ProxyScript
	CertFile    string
	KeyFile     string
	// contains filtered or unexported fields
}

func NewHTTPProxy

func NewHTTPProxy(s *session.Session) *HTTPProxy

func (*HTTPProxy) Configure

func (p *HTTPProxy) Configure(address string, proxyPort int, httpPort int, scriptPath string) error

func (*HTTPProxy) ConfigureTLS

func (p *HTTPProxy) ConfigureTLS(address string, proxyPort int, httpPort int, scriptPath string, certFile string, keyFile string) error

func (*HTTPProxy) Start

func (p *HTTPProxy) Start()

func (*HTTPProxy) Stop

func (p *HTTPProxy) Stop() error

type HttpProxy

type HttpProxy struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewHttpProxy

func NewHttpProxy(s *session.Session) *HttpProxy

func (*HttpProxy) Author

func (p *HttpProxy) Author() string

func (*HttpProxy) Configure

func (p *HttpProxy) Configure() error

func (*HttpProxy) Description

func (p *HttpProxy) Description() string

func (*HttpProxy) Name

func (p *HttpProxy) Name() string

func (*HttpProxy) Start

func (p *HttpProxy) Start() error

func (*HttpProxy) Stop

func (p *HttpProxy) Stop() error

type HttpServer

type HttpServer struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(s *session.Session) *HttpServer

func (*HttpServer) Author

func (httpd *HttpServer) Author() string

func (*HttpServer) Configure

func (httpd *HttpServer) Configure() error

func (*HttpServer) Description

func (httpd *HttpServer) Description() string

func (*HttpServer) Name

func (httpd *HttpServer) Name() string

func (*HttpServer) Start

func (httpd *HttpServer) Start() error

func (*HttpServer) Stop

func (httpd *HttpServer) Stop() error

type HttpsProxy

type HttpsProxy struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewHttpsProxy

func NewHttpsProxy(s *session.Session) *HttpsProxy

func (*HttpsProxy) Author

func (p *HttpsProxy) Author() string

func (*HttpsProxy) Configure

func (p *HttpsProxy) Configure() error

func (*HttpsProxy) Description

func (p *HttpsProxy) Description() string

func (*HttpsProxy) Name

func (p *HttpsProxy) Name() string

func (*HttpsProxy) Start

func (p *HttpsProxy) Start() error

func (*HttpsProxy) Stop

func (p *HttpsProxy) Stop() error

type JSHeader

type JSHeader struct {
	Name  string
	Value string
}

type JSRequest

type JSRequest struct {
	Client      string
	Method      string
	Version     string
	Path        string
	Query       string
	Hostname    string
	ContentType string
	Headers     []JSHeader
	Body        string
	// contains filtered or unexported fields
}

func NewJSRequest

func NewJSRequest(req *http.Request) JSRequest

func (*JSRequest) ParseForm

func (j *JSRequest) ParseForm() map[string]string

func (*JSRequest) ReadBody

func (j *JSRequest) ReadBody() string

type JSResponse

type JSResponse struct {
	Status      int
	ContentType string
	Headers     string
	Body        string
	// contains filtered or unexported fields
}

func NewJSResponse

func NewJSResponse(res *http.Response) *JSResponse

func (*JSResponse) ReadBody

func (j *JSResponse) ReadBody() string

func (*JSResponse) ToResponse

func (j *JSResponse) ToResponse(req *http.Request) (resp *http.Response)

func (*JSResponse) Updated

func (j *JSResponse) Updated()

type JSSessionRequest

type JSSessionRequest struct {
	Command string `json:"cmd"`
}

type JSSessionResponse

type JSSessionResponse struct {
	Error string `json:"error"`
}

type MacChanger

type MacChanger struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewMacChanger

func NewMacChanger(s *session.Session) *MacChanger

func (*MacChanger) Author

func (mc *MacChanger) Author() string

func (*MacChanger) Configure

func (mc *MacChanger) Configure() (err error)

func (*MacChanger) Description

func (mc *MacChanger) Description() string

func (*MacChanger) Name

func (mc *MacChanger) Name() string

func (*MacChanger) Start

func (mc *MacChanger) Start() error

func (*MacChanger) Stop

func (mc *MacChanger) Stop() error

type Prober

type Prober struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewProber

func NewProber(s *session.Session) *Prober

func (Prober) Author

func (p Prober) Author() string

func (*Prober) Configure

func (p *Prober) Configure() error

func (Prober) Description

func (p Prober) Description() string

func (Prober) Name

func (p Prober) Name() string

func (*Prober) Start

func (p *Prober) Start() error

func (*Prober) Stop

func (p *Prober) Stop() error

type ProtoPair

type ProtoPair struct {
	Protocol string
	Hits     uint64
}

type ProtoPairList

type ProtoPairList []ProtoPair

func (ProtoPairList) Len

func (p ProtoPairList) Len() int

func (ProtoPairList) Less

func (p ProtoPairList) Less(i, j int) bool

func (ProtoPairList) Swap

func (p ProtoPairList) Swap(i, j int)

type ProxyScript

type ProxyScript struct {
	sync.Mutex

	Path   string
	Source string
	VM     *otto.Otto
	// contains filtered or unexported fields
}

func LoadProxyScript

func LoadProxyScript(path string, sess *session.Session) (err error, s *ProxyScript)

func LoadProxyScriptSource

func LoadProxyScriptSource(path, source string, sess *session.Session) (err error, s *ProxyScript)

func (*ProxyScript) OnRequest

func (s *ProxyScript) OnRequest(req *http.Request) *JSResponse

func (*ProxyScript) OnResponse

func (s *ProxyScript) OnResponse(res *http.Response) *JSResponse

type RestAPI

type RestAPI struct {
	session.SessionModule
	// contains filtered or unexported fields
}

func NewRestAPI

func NewRestAPI(s *session.Session) *RestAPI

func (*RestAPI) Author

func (api *RestAPI) Author() string

func (*RestAPI) Configure

func (api *RestAPI) Configure() error

func (*RestAPI) Description

func (api *RestAPI) Description() string

func (*RestAPI) Name

func (api *RestAPI) Name() string

func (*RestAPI) Start

func (api *RestAPI) Start() error

func (*RestAPI) Stop

func (api *RestAPI) Stop() error

type SniffData

type SniffData map[string]interface{}

type Sniffer

type Sniffer struct {
	session.SessionModule
	Stats *SnifferStats
	Ctx   *SnifferContext
}

func NewSniffer

func NewSniffer(s *session.Session) *Sniffer

func (Sniffer) Author

func (s Sniffer) Author() string

func (*Sniffer) Configure

func (s *Sniffer) Configure() error

func (Sniffer) Description

func (s Sniffer) Description() string

func (*Sniffer) GetContext

func (s *Sniffer) GetContext() (error, *SnifferContext)

func (Sniffer) Name

func (s Sniffer) Name() string

func (*Sniffer) Start

func (s *Sniffer) Start() error

func (*Sniffer) Stop

func (s *Sniffer) Stop() error

type SnifferContext

type SnifferContext struct {
	Handle       *pcap.Handle
	DumpLocal    bool
	Verbose      bool
	Filter       string
	Expression   string
	Compiled     *regexp.Regexp
	Output       string
	OutputFile   *os.File
	OutputWriter *pcapgo.Writer
}

func NewSnifferContext

func NewSnifferContext() *SnifferContext

func (*SnifferContext) Close

func (c *SnifferContext) Close()

func (*SnifferContext) Log

func (c *SnifferContext) Log(sess *session.Session)

type SnifferEvent

type SnifferEvent struct {
	PacketTime  time.Time
	Protocol    string
	Source      string
	Destination string
	Data        SniffData
	Message     string
}

func NewSnifferEvent

func NewSnifferEvent(t time.Time, proto string, src string, dst string, data SniffData, format string, args ...interface{}) SnifferEvent

func (SnifferEvent) Push

func (e SnifferEvent) Push()

type SnifferStats

type SnifferStats struct {
	NumLocal    uint64
	NumMatched  uint64
	NumDumped   uint64
	NumWrote    uint64
	Started     time.Time
	FirstPacket time.Time
	LastPacket  time.Time
}

func NewSnifferStats

func NewSnifferStats() *SnifferStats

func (*SnifferStats) Print

func (s *SnifferStats) Print() error

type Ticker

type Ticker struct {
	session.SessionModule
	Period   time.Duration
	Commands []string
}

func NewTicker

func NewTicker(s *session.Session) *Ticker

func (*Ticker) Author

func (t *Ticker) Author() string

func (*Ticker) Configure

func (t *Ticker) Configure() error

func (*Ticker) Description

func (t *Ticker) Description() string

func (*Ticker) Name

func (t *Ticker) Name() string

func (*Ticker) Start

func (t *Ticker) Start() error

func (*Ticker) Stop

func (t *Ticker) Stop() error

type WOL

type WOL struct {
	session.SessionModule
}

func NewWOL

func NewWOL(s *session.Session) *WOL

func (*WOL) Author

func (w *WOL) Author() string

func (*WOL) Configure

func (w *WOL) Configure() error

func (*WOL) Description

func (w *WOL) Description() string

func (*WOL) Name

func (w *WOL) Name() string

func (*WOL) Start

func (w *WOL) Start() error

func (*WOL) Stop

func (w *WOL) Stop() error

Jump to

Keyboard shortcuts

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