winapi

package
v0.0.0-...-bdd764d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SE_DEBUG_PRIVILEGE = uint32(20)

	STANDARD_RIGHTS_REQUIRED = uintptr(0xF0000)
	SYNCHRONIZE              = uintptr(0x00100000)
	PROCESS_ALL_ACCESS       = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | uintptr(0xFFFF)

	TOKEN_QUERY    = uintptr(8)
	TIC_TOKEN_USER = uintptr(1)
)

Variables

This section is empty.

Functions

func CloseHandle

func CloseHandle(handle uintptr) error

func ConvertSidToStringSidW

func ConvertSidToStringSidW(sid *SID) (string, error)

func EnumProcesses

func EnumProcesses(buffer *uint32, bufferSize uint32, needed *uint32) error

func GetModuleFileNameExA

func GetModuleFileNameExA(handle uintptr, buffer *byte, bufferSize uint32) (uintptr, error)

func LookupAccountSidW

func LookupAccountSidW(systemName string, sid *SID) (string, error)

func NtQueryInformationProcess

func NtQueryInformationProcess(handle uintptr, processInformationClass uintptr, processInformation *byte, processInformationSize uint32, needed *uint32) error

func NtReadVirtualMemory

func NtReadVirtualMemory(handle uintptr, baseAddress uintptr, buffer *byte, bufferSize uint32, needed *uint32) error

func OpenProcess

func OpenProcess(desiredAccess uintptr, inheritHandle uint32, pid uint32) (uintptr, error)

func OpenProcessToken

func OpenProcessToken(handle uintptr, desiredAccess uintptr) (uintptr, error)

func RtlAdjustPrivilege

func RtlAdjustPrivilege(privilege uint32, enablePrivilege uint32, isThreadPrivilege uint32, previousValue bool) error

Types

type PROCESS_BASIC_INFORMATION

type PROCESS_BASIC_INFORMATION struct {
	Reserved1       uintptr
	PebBaseAddress  uintptr
	Reserved2       [2]uintptr
	UniqueProcessId uintptr
	Reserved3       uintptr
}

type SID

type SID struct{}

type SID_AND_ATTRIBUTES

type SID_AND_ATTRIBUTES struct {
	Sid        *SID
	Attributes uint32
}

type TOKEN_USER

type TOKEN_USER struct {
	User SID_AND_ATTRIBUTES
}

func GetTokenInformation

func GetTokenInformation(thandle uintptr, tokenInformationClass uintptr) (*TOKEN_USER, error)

type UNICODE_STRING

type UNICODE_STRING struct {
	Length    uint16
	MaxLength uint16
	Buffer    uintptr
}

Jump to

Keyboard shortcuts

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