iiop

package
v1.3.5-alpha-0814 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocateRequest byte = 0x03
	LocateReply   byte = 0x04
	Request       byte = 0x00
	Reply         byte = 0x01
)
View Source
const (
	ObjectForward   = 2
	LocationForward = 3
	NoException     = 0
	UserException   = 1
	SystemException = 2
)
View Source
const (
	CallRemoteFunS  = "" /* 620-byte string literal not displayed */
	LocateRequestS  = "47494f50010200030000001700000002000000000000000b4e616d6553657276696365"
	RebindS         = "" /* 2928-byte string literal not displayed */
	BindS           = "" /* 2928-byte string literal not displayed */
	Reslove_anyS    = "" /* 1154-byte string literal not displayed */
	RebindBackdoorS = "" /* 8288-byte string literal not displayed */
)

Variables

View Source
var (
	REQUESTID2           = []byte("\x00\x00\x00\x02")
	REQUESTID3           = []byte("\x00\x00\x00\x03")
	REQUESTFLAG          = []byte("\x03")
	RESERVED             = []byte("\x00\x00\x00")
	TARGET               = []byte("\x00\x00\x00\x00")
	KEYLENGTH            = []byte("\x00\x00\x00\x78")
	OP_bind_any          = []byte("bind_any\x00")
	OP_rebind_any        = []byte("rebind_any\x00")
	OP_resolve_any       = []byte("resolve_any\x00")
	OP_getServerLocation = []byte("getServerLocation\x00")
)
View Source
var Exports = map[string]interface{}{
	"SendPayload":   SendPayload,
	"BindPayload":   GenBindOption,
	"RebindPayload": GenRebindOption,
	"InvokePayload": GenRemoteConstructorPayloadOption,
}

Functions

func GenBindPayload

func GenBindPayload(key []byte, newRmiAddr string) ([]byte, error)

func GenBind_any

func GenBind_any(keyAddress []byte, data []byte) []byte

func GenCallRemoteFunPayload

func GenCallRemoteFunPayload(key []byte, funName string) ([]byte, error)

func GenHeader

func GenHeader(l int) []byte

func GenRebindPayload

func GenRebindPayload(key []byte, newRmiAddr string) ([]byte, error)

func GenRebind_any

func GenRebind_any(keyAddress []byte, data []byte) []byte

func GenRemoteConstructorPayload

func GenRemoteConstructorPayload(key []byte, backDoor string, id int) ([]byte, error)

func GenRequest

func GenRequest(header []byte, REQUESTID []byte, keyAddress []byte, data []byte, op []byte, contextList []byte) []byte

func GenResolve_any2

func GenResolve_any2(keyAddress []byte, data []byte) []byte

func GenResolve_any3

func GenResolve_any3(keyAddress []byte, data []byte) []byte

func GetKeyAddress

func GetKeyAddress(conn net.Conn) ([]byte, error)

func GetKeyAddressTest

func GetKeyAddressTest() ([]byte, error)

func GetKeyFromBytes

func GetKeyFromBytes(locateReply []byte) ([]byte, error)

func GetRequestPayloadTest

func GetRequestPayloadTest() ([]byte, error)

func SendPayload

func SendPayload(addr string, sendPayload PayloadGeneraterFun) error

Types

type BytesUtils

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

func NewBytesUtils

func NewBytesUtils(data []byte) *BytesUtils

func (*BytesUtils) NewChildBytesUtils

func (b *BytesUtils) NewChildBytesUtils(n int) (*BytesUtils, error)

func (*BytesUtils) Next

func (b *BytesUtils) Next(n int)

func (*BytesUtils) Read2BytesToInt

func (b *BytesUtils) Read2BytesToInt() (int, error)

func (*BytesUtils) Read2BytesToIntUnsafe

func (b *BytesUtils) Read2BytesToIntUnsafe() int

func (*BytesUtils) Read4BytesToInt

func (b *BytesUtils) Read4BytesToInt() (int, error)

func (*BytesUtils) Read4BytesToIntUnsafe

func (b *BytesUtils) Read4BytesToIntUnsafe() int

func (*BytesUtils) ReadByte

func (b *BytesUtils) ReadByte() (byte, error)

func (*BytesUtils) ReadByteToUint16

func (b *BytesUtils) ReadByteToUint16() (uint16, error)

func (*BytesUtils) ReadByteToUint16Unsafe

func (b *BytesUtils) ReadByteToUint16Unsafe() uint16

func (*BytesUtils) ReadByteUnsafe

func (b *BytesUtils) ReadByteUnsafe() byte

func (*BytesUtils) ReadBytes

func (b *BytesUtils) ReadBytes(n int) ([]byte, error)

func (*BytesUtils) ReadBytesUnsafe

func (b *BytesUtils) ReadBytesUnsafe(n int) []byte

func (*BytesUtils) ReadOthers

func (b *BytesUtils) ReadOthers() ([]byte, error)

type MessageHeader

type MessageHeader struct {
	Magic       []byte
	Version     []byte
	MessageType byte
	MessageSize int
}

func NewMessageHeader

func NewMessageHeader() *MessageHeader

func ParseHeader

func ParseHeader(data []byte) (*MessageHeader, error)
func Bytes2Int(data []byte) int {
	return int(binary.BigEndian.Uint32(data))
}

type MessageIOR

type MessageIOR struct {
	Length      int
	IOR_type    []byte
	ProfileId   int
	Endianness  byte
	Version     []byte
	ProfileHost []byte
	ProfilePort int
	ObjectKey   []byte
	Others      []byte
}

type MessageRequest

type MessageRequest struct {
	Header             *MessageHeader
	RequestId          int
	TargetAddr         int
	ResponseFalg       byte
	Reserved           []byte
	TargetAddress      int
	KeyAddress         []byte
	Operation          []byte
	ServiceContextList []*ServiceContext
	StubData           []byte
}

func GetBindMsgTmp

func GetBindMsgTmp() *MessageRequest

func GetCallRemoteFunMsgTmp

func GetCallRemoteFunMsgTmp() *MessageRequest

func GetInstallBackDoorMsg

func GetInstallBackDoorMsg(backDoor string) *MessageRequest

func GetLocateRequestMsgTmp

func GetLocateRequestMsgTmp() *MessageRequest

func GetRebindBackdoorMsgTmp

func GetRebindBackdoorMsgTmp() *MessageRequest

func GetRebindMsgTmp

func GetRebindMsgTmp() *MessageRequest

func GetReslove_anyMsgTmp

func GetReslove_anyMsgTmp() *MessageRequest

func NewMessageRequest

func NewMessageRequest() *MessageRequest

func ParseMessageRequest

func ParseMessageRequest(data []byte) (*MessageRequest, error)

func (*MessageRequest) Bytes

func (m *MessageRequest) Bytes() []byte

type MessageResponse

type MessageResponse struct {
	Header             *MessageHeader
	RequestId          int
	ReplyStatus        int
	IOR                *MessageIOR
	ServiceContextList []*ServiceContext
	ExceptionId        []byte
	StubData           []byte
}

func ParseMessageResponse

func ParseMessageResponse(data []byte) (*MessageResponse, error)

type PayloadGeneraterFun

type PayloadGeneraterFun func(net.Conn, []byte) error

func GenBindOption

func GenBindOption(rmi string) PayloadGeneraterFun

func GenRebindOption

func GenRebindOption(rmi string) PayloadGeneraterFun

func GenRemoteConstructorPayloadOption

func GenRemoteConstructorPayloadOption(backDoor string, cmd string) PayloadGeneraterFun

type ServiceContext

type ServiceContext struct {
	Vscid      []byte
	Unknow     byte
	Scid       byte
	Endianness byte
	Data       []byte
}

Jump to

Keyboard shortcuts

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