processor

package
v0.1.4-0...-4d5b6ff Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockCommandMockUidMap util.SafeStringMap = util.NewSafeStringMap() //mockCommand:Mock uid
View Source
var MockCommandUidMap util.SafeStringMap = util.NewSafeStringMap() //mock command:uid string

Functions

func BoundFromLoop

func BoundFromLoop(loop string, perviousError error) (int64, int64, error)

func CallFiddler

func CallFiddler(rpcHandler RpcAble) http.HandlerFunc

func CallHttp

func CallHttp() http.HandlerFunc

func CallMockHTTP

func CallMockHTTP(mock_http_type string) http.HandlerFunc

func CallMysql

func CallMysql() http.HandlerFunc

func CallRawRpc

func CallRawRpc(rpcHandler RpcAble) http.HandlerFunc

func CallRpc

func CallRpc(rpcHandler RpcAble) http.HandlerFunc

func CallTcpFiddler

func CallTcpFiddler(rpcHandler RpcAble) http.HandlerFunc

func CallV2

func CallV2(rw http.ResponseWriter, req *http.Request)

func CallWasm

func CallWasm(gw genericWriter, ws_clientid string)

func CallWasmV2

func CallWasmV2(gw genericWriter, ws_clientid string)

func CommandsGet

func CommandsGet() http.HandlerFunc

func CommonMockWasm

func CommonMockWasm(ctx context.Context, request, response, req_marshalling, res_marshalling interface{}, element_new string, source string, traceid string) uint32

func CommonMockWasmV2

func CommonMockWasmV2(ctx context.Context, type_ string, request, response, req_marshalling, res_marshalling interface{}, element_new string, source string, traceid string) uint32

func FiddlerMockWasmBeforeReq

func FiddlerMockWasmBeforeReq(ctx context.Context, request, new_request interface{}, element_new string, url_path string, request_index_in_report *int64) (uint32, bool)

func FiddlerMockWasmBeforeRes

func FiddlerMockWasmBeforeRes(ctx context.Context, request, response interface{}, element_new string, reqA *http.Request, request_index_in_report int64, skipReport bool) uint32

func GetCert

func GetCert(rw http.ResponseWriter, req *http.Request)

func GetIndexDB

func GetIndexDB(rw http.ResponseWriter, req *http.Request)

func HandleAT

func HandleAT(loop string, code []byte, isHttp bool, isHttpFiddlerAB bool, http_targetList []string, tcp_targetList []string, response *model.CallApiResponse, rw http.ResponseWriter, req *http.Request, rpcHandler RpcAble)

func HandleHttpFiddlerAB

func HandleHttpFiddlerAB(code []byte, isHttpFiddlerAB bool, http_targetList []string, response *model.CallApiResponse, rw http.ResponseWriter, req *http.Request, rpcHandler RpcAble)

func HandleTcpFiddlerAB

func HandleTcpFiddlerAB(code []byte, isTcpFiddlerAB bool, tcp_targetList []string, response *model.CallApiResponse, rw http.ResponseWriter, req *http.Request, rpcHandler RpcAble)

func Max

func Max(x, y uint32) uint32

func MockFIDDLEInit

func MockFIDDLEInit()

func MockHTTPInit

func MockHTTPInit()

func OauthLogin

func OauthLogin(rpcHandler RpcAble) http.HandlerFunc

func RegisterCommands

func RegisterCommands(rpcHandler RpcAble) http.HandlerFunc

func RegisterHostCall

func RegisterHostCall(f func(string, string, string, []byte) ([]byte, error))

func RegisterProcessors

func RegisterProcessors(cmdList []string, route string, rpcHandler RpcAble)

func Report

func Report(rw http.ResponseWriter, req *http.Request)

func ReportData

func ReportData(rw http.ResponseWriter, req *http.Request)

func SetBaseWsCall

func SetBaseWsCall(rw http.ResponseWriter, req *http.Request)

func SetBaseWsCallFromBox

func SetBaseWsCallFromBox()

func SetBaseWsMock

func SetBaseWsMock(rw http.ResponseWriter, req *http.Request)

func SetBaseWsMockFromBox

func SetBaseWsMockFromBox()

func SetCertFile

func SetCertFile(rw http.ResponseWriter, req *http.Request)

func SetMock

func SetMock(rw http.ResponseWriter, req *http.Request)

func SetMockBeforeRequestFiddler

func SetMockBeforeRequestFiddler(rw http.ResponseWriter, req *http.Request)

func SetMockBeforeRequestTCPFiddler

func SetMockBeforeRequestTCPFiddler(rw http.ResponseWriter, req *http.Request)

func SetMockHTTP

func SetMockHTTP(rw http.ResponseWriter, req *http.Request)

func SetMockTCP

func SetMockTCP(rw http.ResponseWriter, req *http.Request)

func StoreIndexDB

func StoreIndexDB(rw http.ResponseWriter, req *http.Request)

func TcpFiddlerMockWasmBeforeReq

func TcpFiddlerMockWasmBeforeReq(ctx context.Context, request, new_request interface{}, element_new string, request_index_in_report *int64, l_remote_addr string, real_l_remote_addr string, real_r_local_addr string) ([]uint32, []capabilities.Entity)

func TcpFiddlerMockWasmBeforeRes

func TcpFiddlerMockWasmBeforeRes(ctx context.Context, response interface{}, element_new string, skipReport bool, l_remote_addr string, real_l_remote_addr string, real_r_local_addr string) ([]uint32, []capabilities.Entity)

func TcpModifyRequest

func TcpModifyRequest(req *Bytes, port_map string, l_remote_addr string, real_l_remote_addr string, real_r_local_addr string) (error, []capabilities.Entity)

func TcpModifyResponse

func TcpModifyResponse(res *Bytes, port_map string, l_remote_addr string, real_l_remote_addr string, real_r_local_addr string) (error, []capabilities.Entity)

func TemplateInit

func TemplateInit()

func UnifiedV2

func UnifiedV2(rpcHandler RpcAble) http.HandlerFunc

func UseKeyFile

func UseKeyFile(rw http.ResponseWriter, req *http.Request)

func WebsocketRPC

func WebsocketRPC(rpcHandler RpcAble) http.HandlerFunc

func WebsocketSetMock

func WebsocketSetMock(rw http.ResponseWriter, req *http.Request)

func WebsocketSetMockBeforeRequestFiddler

func WebsocketSetMockBeforeRequestFiddler(rw http.ResponseWriter, req *http.Request)

func WebsocketSetMockTcpFiddler

func WebsocketSetMockTcpFiddler(rw http.ResponseWriter, req *http.Request)

func WebsocketTrace

func WebsocketTrace(rw http.ResponseWriter, req *http.Request)

func WsCall

func WsCall(uid string, fn string, index int64, callNetConn util.SafeWsConnMap, req []byte) ([]byte, error)

func WsMock

func WsMock(uid string, fn string, mockUINetConn util.SafeWsConnMap, req []byte) ([]byte, error)

func WsTrace

func WsTrace(resp *http.Response, traceNetConn *util.SafeWsConnMap, readable_req_body string, readable_res_body string)

Types

type Bytes

type Bytes []byte

func (*Bytes) Marshal

func (m *Bytes) Marshal() (dAtA []byte, err error)

func (*Bytes) MarshalJSON

func (m *Bytes) MarshalJSON() ([]byte, error)

func (*Bytes) ProtoMessage

func (*Bytes) ProtoMessage()

func (*Bytes) Reset

func (m *Bytes) Reset()

func (*Bytes) Size

func (m *Bytes) Size()

func (*Bytes) String

func (m *Bytes) String() string

func (*Bytes) Unmarshal

func (m *Bytes) Unmarshal(dAtA []byte) error

func (*Bytes) UnmarshalJSON

func (m *Bytes) UnmarshalJSON(dAtA []byte) error

type CertCache

type CertCache struct {
	// contains filtered or unexported fields
}

func (*CertCache) Get

func (c *CertCache) Get(host string) *tls.Certificate

func (*CertCache) Set

func (c *CertCache) Set(host string, cert *tls.Certificate)

type FiddleAB

type FiddleAB struct {
	ReqA        *http.Request
	ResB        capabilities.Response
	ReportIndex int64
	End         bool
}

type Index_db_struct

type Index_db_struct struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Modifier

type Modifier struct {
}

func (*Modifier) ModifyRequest

func (e *Modifier) ModifyRequest(req *http.Request) error

func (*Modifier) ModifyResponse

func (e *Modifier) ModifyResponse(resp *http.Response) error

type RpcAble

type RpcAble interface {
	Start([]string)
	Stop()
	HostCallSpecific(string, string, string, []byte) ([]byte, error)
	RegisterCommand(string, func(ctx context.Context, request, response interface{}) uint32)
	RpcRequest(string, proto.Message, proto.Message) uint32
	Source(context.Context, interface{}) string
	TraceId(context.Context, interface{}) string
	FiddleQueue(chan FiddleAB, chan FiddleAB)
	TcpFiddleQueue(chan TcpFiddleAB, chan TcpFiddleAB)
	UserPermissionJWT(string, string) (string, error)
}
var RpcHandler RpcAble

type TcpFiddleAB

type TcpFiddleAB struct {
	ReqA        []byte
	ReqAString  string
	ResB        []byte
	ResBString  string
	ReportIndex int64
	End         bool
	PortMap     string
}

type TcpPayload

type TcpPayload struct {
	Laddr     string
	Raddr     string
	Payload   string
	Tcp_Items []capabilities.TcpItem
}

Jump to

Keyboard shortcuts

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