sec

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXCHANGE_PKT       uint16 = 0x0001
	TRANSPORT_REQ             = 0x0002
	TRANSPORT_RSP             = 0x0004
	ENCRYPT                   = 0x0008
	RESET_SEQNO               = 0x0010
	IGNORE_SEQNO              = 0x0020
	INFO_PKT                  = 0x0040
	LICENSE_PKT               = 0x0080
	LICENSE_ENCRYPT_CS        = 0x0200
	LICENSE_ENCRYPT_SC        = 0x0200
	REDIRECTION_PKT           = 0x0400
	SECURE_CHECKSUM           = 0x0800
	AUTODETECT_REQ            = 0x1000
	AUTODETECT_RSP            = 0x2000
	HEARTBEAT                 = 0x4000
	FLAGSHI_VALID             = 0x8000
)

*

View Source
const (
	INFO_MOUSE                  uint32 = 0x00000001
	INFO_DISABLECTRLALTDEL             = 0x00000002
	INFO_AUTOLOGON                     = 0x00000008
	INFO_UNICODE                       = 0x00000010
	INFO_MAXIMIZESHELL                 = 0x00000020
	INFO_LOGONNOTIFY                   = 0x00000040
	INFO_COMPRESSION                   = 0x00000080
	INFO_ENABLEWINDOWSKEY              = 0x00000100
	INFO_REMOTECONSOLEAUDIO            = 0x00002000
	INFO_FORCE_ENCRYPTED_CS_PDU        = 0x00004000
	INFO_RAIL                          = 0x00008000
	INFO_LOGONERRORS                   = 0x00010000
	INFO_MOUSE_HAS_WHEEL               = 0x00020000
	INFO_PASSWORD_IS_SC_PIN            = 0x00040000
	INFO_NOAUDIOPLAYBACK               = 0x00080000
	INFO_USING_SAVED_CREDS             = 0x00100000
	INFO_AUDIOCAPTURE                  = 0x00200000
	INFO_VIDEO_DISABLE                 = 0x00400000
	INFO_CompressionTypeMask           = 0x00001E00
)
View Source
const (
	AF_INET  uint16 = 0x00002
	AF_INET6        = 0x0017
)
View Source
const (
	PERF_DISABLE_WALLPAPER          uint32 = 0x00000001
	PERF_DISABLE_FULLWINDOWDRAG            = 0x00000002
	PERF_DISABLE_MENUANIMATIONS            = 0x00000004
	PERF_DISABLE_THEMING                   = 0x00000008
	PERF_DISABLE_CURSOR_SHADOW             = 0x00000020
	PERF_DISABLE_CURSORSETTINGS            = 0x00000040
	PERF_ENABLE_FONT_SMOOTHING             = 0x00000080
	PERF_ENABLE_DESKTOP_COMPOSITION        = 0x00000100
)
View Source
const (
	FASTPATH_OUTPUT_SECURE_CHECKSUM = 0x1
	FASTPATH_OUTPUT_ENCRYPTED       = 0x2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*SEC
	// contains filtered or unexported fields
}

func NewClient

func NewClient(t core.Transport) *Client

func (*Client) ClientCoreData

func (c *Client) ClientCoreData() *gcc.ClientCoreData

func (*Client) ClientNetworkData

func (c *Client) ClientNetworkData() *gcc.ClientNetworkData

func (*Client) ClientSecurityData

func (c *Client) ClientSecurityData() *gcc.ClientSecurityData

func (*Client) RecvFastPath

func (c *Client) RecvFastPath(secFlag byte, s []byte)

func (*Client) ServerSecurityData

func (c *Client) ServerSecurityData() *gcc.ServerSecurityData

func (*Client) SetAlternateShell

func (c *Client) SetAlternateShell(shell string)

func (*Client) SetClientAutoReconnect

func (c *Client) SetClientAutoReconnect(id uint32, random []byte)

func (*Client) SetDomain

func (c *Client) SetDomain(domain string)

func (*Client) SetFastPathListener

func (c *Client) SetFastPathListener(f core.FastPathListener)

func (*Client) SetPwd

func (c *Client) SetPwd(pwd string)

func (*Client) SetUser

func (c *Client) SetUser(user string)

type ClientAutoReconnect

type ClientAutoReconnect struct {
	CbAutoReconnectLen uint16
	CbLen              uint32
	Version            uint32
	LogonId            uint32
	SecVerifier        []byte
}

func NewClientAutoReconnect

func NewClientAutoReconnect(id uint32, random []byte) *ClientAutoReconnect

type ClientSecurityExchangePDU

type ClientSecurityExchangePDU struct {
	Length                uint32 `struc:"little"`
	EncryptedClientRandom []byte `struc:"little"`
	Padding               []byte `struc:"[8]byte"`
}

type RDPExtendedInfo

type RDPExtendedInfo struct {
	ClientAddressFamily uint16 `struc:"little"`
	CbClientAddress     uint16 `struc:"little,sizeof=ClientAddress"`
	ClientAddress       []byte `struc:"[]byte"`
	CbClientDir         uint16 `struc:"little,sizeof=ClientDir"`
	ClientDir           []byte `struc:"[]byte"`
	ClientTimeZone      []byte `struc:"[172]byte"`
	ClientSessionId     uint32 `struc:"litttle"`
	PerformanceFlags    uint32 `struc:"little"`
	AutoReconnect       *ClientAutoReconnect
}

func NewExtendedInfo

func NewExtendedInfo(auto *ClientAutoReconnect) *RDPExtendedInfo

func (*RDPExtendedInfo) Serialize

func (o *RDPExtendedInfo) Serialize() []byte

type RDPInfo

type RDPInfo struct {
	CodePage         uint32
	Flag             uint32
	CbDomain         uint16
	CbUserName       uint16
	CbPassword       uint16
	CbAlternateShell uint16
	CbWorkingDir     uint16
	Domain           []byte
	UserName         []byte
	Password         []byte
	AlternateShell   []byte
	WorkingDir       []byte
	ExtendedInfo     *RDPExtendedInfo
}

func NewRDPInfo

func NewRDPInfo() *RDPInfo

func (*RDPInfo) Serialize

func (o *RDPInfo) Serialize(hasExtended bool) []byte

func (*RDPInfo) SetClientAutoReconnect

func (o *RDPInfo) SetClientAutoReconnect(auto *ClientAutoReconnect)

type SEC

type SEC struct {
	emission.Emitter
	// contains filtered or unexported fields
}

func NewSEC

func NewSEC(t core.Transport) *SEC

func (*SEC) Close

func (s *SEC) Close() error

func (*SEC) Read

func (s *SEC) Read(data []byte) (n int, err error)

func (*SEC) Write

func (s *SEC) Write(b []byte) (n int, err error)

type SecurityHeader

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

Jump to

Keyboard shortcuts

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