structs

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReverseType_name = map[int32]string{
		0: "Ceye",
		1: "DnslogCN",
	}
	ReverseType_value = map[string]int32{
		"Ceye":     0,
		"DnslogCN": 1,
	}
)

Enum value maps for ReverseType.

View Source
var File_requests_proto protoreflect.FileDescriptor
View Source
var ORDER = 0

Functions

This section is empty.

Types

type AddrType

type AddrType struct {
	Transport string `protobuf:"bytes,1,opt,name=transport,proto3" json:"transport,omitempty"`
	Addr      string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Port      string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*AddrType) Descriptor deprecated

func (*AddrType) Descriptor() ([]byte, []int)

Deprecated: Use AddrType.ProtoReflect.Descriptor instead.

func (*AddrType) GetAddr

func (x *AddrType) GetAddr() string

func (*AddrType) GetPort

func (x *AddrType) GetPort() string

func (*AddrType) GetTransport

func (x *AddrType) GetTransport() string

func (*AddrType) ProtoMessage

func (*AddrType) ProtoMessage()

func (*AddrType) ProtoReflect

func (x *AddrType) ProtoReflect() protoreflect.Message

func (*AddrType) Reset

func (x *AddrType) Reset()

func (*AddrType) String

func (x *AddrType) String() string

type ConnInfoType

type ConnInfoType struct {
	Source      *AddrType `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	Destination *AddrType `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnInfoType) Descriptor deprecated

func (*ConnInfoType) Descriptor() ([]byte, []int)

Deprecated: Use ConnInfoType.ProtoReflect.Descriptor instead.

func (*ConnInfoType) GetDestination

func (x *ConnInfoType) GetDestination() *AddrType

func (*ConnInfoType) GetSource

func (x *ConnInfoType) GetSource() *AddrType

func (*ConnInfoType) ProtoMessage

func (*ConnInfoType) ProtoMessage()

func (*ConnInfoType) ProtoReflect

func (x *ConnInfoType) ProtoReflect() protoreflect.Message

func (*ConnInfoType) Reset

func (x *ConnInfoType) Reset()

func (*ConnInfoType) String

func (x *ConnInfoType) String() string

type Detail

type Detail struct {
	Author        string        `yaml:"author"`
	Links         []string      `yaml:"links"`
	FingerPrint   FingerPrint   `yaml:"fingerprint"`
	Vulnerability Vulnerability `yaml:"vulnerability"`
	Description   string        `yaml:"description"`
	Version       string        `yaml:"version"`
	Tags          string        `yaml:"tags"`
}

type FingerPrint

type FingerPrint struct {
	Infos    []Infos  `yaml:"infos"`
	HostInfo HostInfo `yaml:"host_info"`
}

type HostInfo

type HostInfo struct {
	Hostname string `yaml:"hostname"`
}

type HttpRequestCache

type HttpRequestCache struct {
	Request       *http.Request
	ProtoRequest  *Request
	ProtoResponse *Response
}

type Infos

type Infos struct {
	ID         string `yaml:"id"`
	Name       string `yaml:"name"`
	Version    string `yaml:"version"`
	Type       string `yaml:"type"`
	Confidence int    `yaml:"confidence"`
}

type Payloads

type Payloads struct {
	Continue bool             `yaml:"continue,omitempty"`
	Payloads PayloadsMapSlice `yaml:"payloads"`
}

type PayloadsMapSlice

type PayloadsMapSlice = yaml.MapSlice

type Poc

type Poc struct {
	Name       string       `yaml:"name"`
	Transport  string       `yaml:"transport"`
	Set        SetMapSlice  `yaml:"set"`
	Payloads   Payloads     `yaml:"payloads"`
	Rules      RuleMapSlice `yaml:"rules"`
	Expression string       `yaml:"expression"`
	Detail     Detail       `yaml:"detail"`
}

type Request

type Request struct {
	Url          *UrlType          `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Method       string            `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Headers      map[string]string `` /* 155-byte string literal not displayed */
	ContentType  string            `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Body         []byte            `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	Raw          []byte            `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"`
	RawHeader    []byte            `protobuf:"bytes,7,opt,name=raw_header,json=rawHeader,proto3" json:"raw_header,omitempty"`
	Content      string            `protobuf:"bytes,8,opt,name=content,proto3" json:"content,omitempty"`
	ReadTimeout  string            `protobuf:"bytes,9,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
	ConnectionId string            `protobuf:"bytes,10,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetBody

func (x *Request) GetBody() []byte

func (*Request) GetConnectionId

func (x *Request) GetConnectionId() string

func (*Request) GetContent

func (x *Request) GetContent() string

func (*Request) GetContentType

func (x *Request) GetContentType() string

func (*Request) GetHeaders

func (x *Request) GetHeaders() map[string]string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetRaw

func (x *Request) GetRaw() []byte

func (*Request) GetRawHeader

func (x *Request) GetRawHeader() []byte

func (*Request) GetReadTimeout

func (x *Request) GetReadTimeout() string

func (*Request) GetUrl

func (x *Request) GetUrl() *UrlType

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Url         *UrlType          `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Status      int32             `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Headers     map[string]string `` /* 155-byte string literal not displayed */
	ContentType string            `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Body        []byte            `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	Raw         []byte            `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"`
	RawHeader   []byte            `protobuf:"bytes,7,opt,name=raw_header,json=rawHeader,proto3" json:"raw_header,omitempty"`
	Latency     int64             `protobuf:"varint,8,opt,name=latency,proto3" json:"latency,omitempty"`
	Conn        *ConnInfoType     `protobuf:"bytes,9,opt,name=conn,proto3" json:"conn,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetBody

func (x *Response) GetBody() []byte

func (*Response) GetConn

func (x *Response) GetConn() *ConnInfoType

func (*Response) GetContentType

func (x *Response) GetContentType() string

func (*Response) GetHeaders

func (x *Response) GetHeaders() map[string]string

func (*Response) GetLatency

func (x *Response) GetLatency() int64

func (*Response) GetRaw

func (x *Response) GetRaw() []byte

func (*Response) GetRawHeader

func (x *Response) GetRawHeader() []byte

func (*Response) GetStatus

func (x *Response) GetStatus() int32

func (*Response) GetUrl

func (x *Response) GetUrl() *UrlType

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Reverse

type Reverse struct {
	Url                *UrlType    `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Domain             string      `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
	Ip                 string      `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	IsDomainNameServer bool        `protobuf:"varint,4,opt,name=is_domain_name_server,json=isDomainNameServer,proto3" json:"is_domain_name_server,omitempty"`
	ReverseType        ReverseType `protobuf:"varint,5,opt,name=reverse_type,json=reverseType,proto3,enum=structs.ReverseType" json:"reverse_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Reverse) Descriptor deprecated

func (*Reverse) Descriptor() ([]byte, []int)

Deprecated: Use Reverse.ProtoReflect.Descriptor instead.

func (*Reverse) GetDomain

func (x *Reverse) GetDomain() string

func (*Reverse) GetIp

func (x *Reverse) GetIp() string

func (*Reverse) GetIsDomainNameServer

func (x *Reverse) GetIsDomainNameServer() bool

func (*Reverse) GetReverseType

func (x *Reverse) GetReverseType() ReverseType

func (*Reverse) GetUrl

func (x *Reverse) GetUrl() *UrlType

func (*Reverse) ProtoMessage

func (*Reverse) ProtoMessage()

func (*Reverse) ProtoReflect

func (x *Reverse) ProtoReflect() protoreflect.Message

func (*Reverse) Reset

func (x *Reverse) Reset()

func (*Reverse) String

func (x *Reverse) String() string

type ReverseType

type ReverseType int32
const (
	ReverseType_Ceye     ReverseType = 0
	ReverseType_DnslogCN ReverseType = 1
)

func (ReverseType) Descriptor

func (ReverseType) Enum

func (x ReverseType) Enum() *ReverseType

func (ReverseType) EnumDescriptor deprecated

func (ReverseType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ReverseType.Descriptor instead.

func (ReverseType) Number

func (x ReverseType) Number() protoreflect.EnumNumber

func (ReverseType) String

func (x ReverseType) String() string

func (ReverseType) Type

type Rule

type Rule struct {
	Request    RuleRequest   `yaml:"request"`
	Expression string        `yaml:"expression"`
	Output     yaml.MapSlice `yaml:"output"`
	// contains filtered or unexported fields
}

参考 pocassist/blob/master/poc/rule/rule.go 单个规则

func (*Rule) UnmarshalYAML

func (r *Rule) UnmarshalYAML(unmarshal func(interface{}) error) error

type RuleMapItem

type RuleMapItem struct {
	Key   string
	Value Rule
}

用于帮助yaml解析,保证Rule有序

type RuleMapSlice

type RuleMapSlice []RuleMapItem

用于帮助yaml解析,保证Rule有序

func (*RuleMapSlice) UnmarshalYAML

func (m *RuleMapSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

type RuleRequest

type RuleRequest struct {
	Cache           bool              `yaml:"cache"`
	Method          string            `yaml:"method"`
	Path            string            `yaml:"path"`
	Headers         map[string]string `yaml:"headers"`
	Body            string            `yaml:"body"`
	FollowRedirects bool              `yaml:"follow_redirects"`
	Content         string            `yaml:"content"`
	ReadTimeout     string            `yaml:"read_timeout"`
	ConnectionID    string            `yaml:"connection_id"`
}

type SetMapSlice

type SetMapSlice = yaml.MapSlice

type TCPUDPRequestCache

type TCPUDPRequestCache struct {
	Response      []byte
	ProtoResponse *Response
}

type Task

type Task struct {
	Poc    Poc
	Target string
}

type UrlType

type UrlType struct {
	Scheme   string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`
	Domain   string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
	Host     string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
	Port     string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
	Path     string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
	Query    string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"`
	Fragment string `protobuf:"bytes,7,opt,name=fragment,proto3" json:"fragment,omitempty"`
	// contains filtered or unexported fields
}

func (*UrlType) Descriptor deprecated

func (*UrlType) Descriptor() ([]byte, []int)

Deprecated: Use UrlType.ProtoReflect.Descriptor instead.

func (*UrlType) GetDomain

func (x *UrlType) GetDomain() string

func (*UrlType) GetFragment

func (x *UrlType) GetFragment() string

func (*UrlType) GetHost

func (x *UrlType) GetHost() string

func (*UrlType) GetPath

func (x *UrlType) GetPath() string

func (*UrlType) GetPort

func (x *UrlType) GetPort() string

func (*UrlType) GetQuery

func (x *UrlType) GetQuery() string

func (*UrlType) GetScheme

func (x *UrlType) GetScheme() string

func (*UrlType) ProtoMessage

func (*UrlType) ProtoMessage()

func (*UrlType) ProtoReflect

func (x *UrlType) ProtoReflect() protoreflect.Message

func (*UrlType) Reset

func (x *UrlType) Reset()

func (*UrlType) String

func (x *UrlType) String() string

type Vulnerability

type Vulnerability struct {
	ID    string `yaml:"id"`
	Match string `yaml:"match"`
}

Jump to

Keyboard shortcuts

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