warden

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckSkip      = 0   // SKIP
	CheckTiming    = 87  // nyi
	CheckDriver    = 113 // uint Seed + byte[20] SHA1 + byte driverNameIndex (check to ensure driver isn't loaded)
	CheckProcess   = 126 // nyi
	CheckLuaEval   = 139 // evaluate arbitrary Lua check
	CheckPaQ       = 152 // get hash of MPQ file (to check it is not modified)
	CheckAllPages  = 178 // scans all pages for specified SHA1 hash
	CheckMZPEPages = 191 // scans only pages starts with MZ+PE headers for specified hash
	CheckModule    = 217 // check to make sure module isn't injected
	CheckMem       = 243 // retrieve specific memory
)
View Source
const PageCheckOK = 0xE9

Variables

View Source
var (
	ErrCheckBadChecksum  = Error{"Bad checksum in client cheat checks"}
	ErrNeedCurrentChecks = Error{"CClientCheatChecksResult contains no intrinsic structure. It requires the last set of warden checks to be parsed"}
)

Functions

This section is empty.

Types

type CheatCheck

type CheatCheck struct {
	Type    CheckType
	String  string
	Address uint64
	Size    uint32
	Data    []byte
}

type CheckType

type CheckType uint8

type ClientCheatChecksResult

type ClientCheatChecksResult struct {
	CurrentChecks *ServerRequestCheatChecks
	Length        uint16
	Checksum      uint32
	CheckResults  []ClientCheckResult
}

func (*ClientCheatChecksResult) Command

func (cccr *ClientCheatChecksResult) Command() Command

func (*ClientCheatChecksResult) Decode

func (cccr *ClientCheatChecksResult) Decode(build vsn.Build, in *Reader) (err error)

func (*ClientCheatChecksResult) Encode

func (cccr *ClientCheatChecksResult) Encode(build vsn.Build, out *Writer) (err error)

type ClientCheckResult

type ClientCheckResult struct {
	Result         uint8
	Response       []byte
	NewClientTicks uint32
	Time           time.Time
}

type ClientData

type ClientData struct {
	Result ClientResult
}

func (*ClientData) Decode

func (cd *ClientData) Decode(build vsn.Build, in *Reader) error

func (*ClientData) Encode

func (cd *ClientData) Encode(build vsn.Build, out *Writer) error

type ClientHashResult

type ClientHashResult struct {
	Response []byte
}

func (*ClientHashResult) Command

func (chr *ClientHashResult) Command() Command

func (*ClientHashResult) Decode

func (chr *ClientHashResult) Decode(build vsn.Build, in *Reader) error

func (*ClientHashResult) Encode

func (chr *ClientHashResult) Encode(build vsn.Build, out *Writer) error

type ClientResult

type ClientResult Request

type Command

type Command uint8
const (
	CServerModuleUse Command = iota
	CServerModuleTransfer
	CServerRequestCheatChecks
	CServerModuleInitialize
	CServerRequestMemoryChecks
	CServerHashRequest
)
const (
	CClientModuleMissing Command = iota
	CClientModuleOK
	CClientCheatChecksResult
	CClientMemoryChecksResult
	CClientHashResult
	CClientModuleFailed
)

type CryptoData

type CryptoData struct {
	ClientKey []byte // _inputKey in TrinityCore
	ServerKey []byte // _outputKey in TrinityCore
}

type Error

type Error struct {
	Msg string
}

func (Error) Error

func (e Error) Error() string

type MemoryCheck

type MemoryCheck struct {
	MemType uint8
	Module  string
	Offset  uint32
	Data    []byte
}

type Reader

type Reader struct {
	CryptoData
	io.Reader
}

type Request

type Request interface {
	Command() Command
	Encode(build vsn.Build, out *Writer) error
	Decode(build vsn.Build, in *Reader) error
}

type ServerData

type ServerData struct {
	Requests []ServerRequest
}

func (*ServerData) Decode

func (sd *ServerData) Decode(build vsn.Build, in *Reader) error

func (*ServerData) Encode

func (sd *ServerData) Encode(build vsn.Build, out *Writer) error

type ServerHashRequest

type ServerHashRequest struct {
	Seed []byte
}

func (*ServerHashRequest) Command

func (shr *ServerHashRequest) Command() Command

func (*ServerHashRequest) Decode

func (shr *ServerHashRequest) Decode(build vsn.Build, in *Reader) error

func (*ServerHashRequest) Encode

func (shr *ServerHashRequest) Encode(build vsn.Build, out *Writer) error

type ServerModuleInitialize

type ServerModuleInitialize struct {
	SizeFlags     uint16
	Type          uint8
	StringLibrary uint8
	Function      []uint64
	FunctionSet   uint8
}

func (*ServerModuleInitialize) Command

func (smu *ServerModuleInitialize) Command() Command

func (*ServerModuleInitialize) Decode

func (smi *ServerModuleInitialize) Decode(build vsn.Build, in *Reader) error

func (*ServerModuleInitialize) Encode

func (smi *ServerModuleInitialize) Encode(build vsn.Build, out *Writer) error

type ServerModuleTransfer

type ServerModuleTransfer struct {
	Data []byte
}

func (*ServerModuleTransfer) Command

func (smt *ServerModuleTransfer) Command() Command

func (*ServerModuleTransfer) Decode

func (smt *ServerModuleTransfer) Decode(build vsn.Build, in *Reader) (err error)

func (*ServerModuleTransfer) Encode

func (smt *ServerModuleTransfer) Encode(build vsn.Build, out *Writer) (err error)

type ServerModuleUse

type ServerModuleUse struct {
	ModuleID  [16]byte
	ModuleKey [16]byte
	Size      uint32
}

func (*ServerModuleUse) Command

func (smu *ServerModuleUse) Command() Command

func (*ServerModuleUse) Decode

func (smu *ServerModuleUse) Decode(build vsn.Build, in *Reader) error

func (*ServerModuleUse) Encode

func (smu *ServerModuleUse) Encode(build vsn.Build, out *Writer) error

type ServerRequest

type ServerRequest Request

type ServerRequestCheatChecks

type ServerRequestCheatChecks struct {
	Checks []CheatCheck
}

func (*ServerRequestCheatChecks) Command

func (srcc *ServerRequestCheatChecks) Command() Command

func (*ServerRequestCheatChecks) Decode

func (srcc *ServerRequestCheatChecks) Decode(build vsn.Build, in *Reader) (err error)

func (*ServerRequestCheatChecks) Encode

func (srcc *ServerRequestCheatChecks) Encode(build vsn.Build, out *Writer) (err error)

type ServerRequestMemoryChecks

type ServerRequestMemoryChecks struct {
	Checks []MemoryCheck
}

func (*ServerRequestMemoryChecks) Command

func (srmc *ServerRequestMemoryChecks) Command() Command

func (*ServerRequestMemoryChecks) Decode

func (srmc *ServerRequestMemoryChecks) Decode(build vsn.Build, in *Reader) error

func (*ServerRequestMemoryChecks) Encode

func (srmc *ServerRequestMemoryChecks) Encode(build vsn.Build, out *Writer) error

type Writer

type Writer struct {
	CryptoData
	io.Writer
}

Jump to

Keyboard shortcuts

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