Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ddkwork committed Nov 24, 2024
1 parent 5590f41 commit 3675c48
Showing 1 changed file with 67 additions and 67 deletions.
134 changes: 67 additions & 67 deletions sdk/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,96 +8,96 @@ import (

type API interface {
init()
DetectVmxSupport() Boolean
DetectVmxSupport() bool
ReadVendorString(arg0 *Char)
LoadVmm() Int
UnloadVmm() Int
InstallVmmDriver() Int
UninstallVmmDriver() Int
StopVmmDriver() Int
TestCommandParser(command *Char, number_of_tokens uint32, tokens_list **Char, failed_token_num *uint32, failed_token_position *uint32) Boolean
TestCommandParser(command *Char, number_of_tokens uint32, tokens_list **Char, failed_token_num *uint32, failed_token_position *uint32) bool
TestCommandParserShowTokens(command *Char)
SetupPathForFilename(filename *Char, file_location *Char, buffer_len uint32, check_file_existence Boolean) Boolean
SetupPathForFilename(filename *Char, file_location *Char, buffer_len uint32, check_file_existence bool) bool
RunCommand(command *Char) Int
ShowSignature()
SetTextMessageCallback(handler unsafe.Pointer)
SetTextMessageCallbackUsingSharedBuffer(handler unsafe.Pointer) unsafe.Pointer
UnsetTextMessageCallback()
ScriptReadFileAndExecuteCommandline(argc Int, argv **Char) Int
ContinuePreviousCommand() Boolean
CheckMultilineCommand(current_command *Char, reset Boolean) Boolean
SetCustomDriverPath(driver_file_path *Char, driver_name *Char) Boolean
ContinuePreviousCommand() bool
CheckMultilineCommand(current_command *Char, reset bool) bool
SetCustomDriverPath(driver_file_path *Char, driver_name *Char) bool
UseDefaultDriverPath()
ConnectLocalDebugger()
ConnectRemoteDebugger(ip *Char, port *Char) Boolean
ConnectRemoteDebuggerUsingComPort(port_name *Char, baudrate Dword, pause_after_connection Boolean) Boolean
ConnectRemoteDebuggerUsingNamedPipe(named_pipe *Char, pause_after_connection Boolean) Boolean
ConnectCurrentDebuggerUsingComPort(port_name *Char, baudrate Dword) Boolean
DebugCloseRemoteDebugger() Boolean
ConnectRemoteDebugger(ip *Char, port *Char) bool
ConnectRemoteDebuggerUsingComPort(port_name *Char, baudrate Dword, pause_after_connection bool) bool
ConnectRemoteDebuggerUsingNamedPipe(named_pipe *Char, pause_after_connection bool) bool
ConnectCurrentDebuggerUsingComPort(port_name *Char, baudrate Dword) bool
DebugCloseRemoteDebugger() bool
GetKernelBase() uint64
ReadMemory(target_address uint64, memory_type DebuggerReadMemoryType, reading_Type DebuggerReadReadingType, pid uint32, size uint32, get_address_mode Boolean, address_mode *DebuggerReadMemoryAddressMode, target_buffer_to_store *Byte, return_length *uint32) Boolean
ReadMemory(target_address uint64, memory_type DebuggerReadMemoryType, reading_Type DebuggerReadReadingType, pid uint32, size uint32, get_address_mode bool, address_mode *DebuggerReadMemoryAddressMode, target_buffer_to_store *Byte, return_length *uint32) bool
ShowMemoryOrDisassemble(style DebuggerShowMemoryStyle, address uint64, memory_type DebuggerReadMemoryType, reading_type DebuggerReadReadingType, pid uint32, size uint32, dt_details PdebuggerDtCommandOptions)
WriteMemory(destination_address unsafe.Pointer, memory_type DebuggerEditMemoryType, process_id uint32, source_address unsafe.Pointer, number_of_bytes uint32) Boolean
ReadAllRegisters(guest_registers unsafe.Pointer, extra_registers unsafe.Pointer) Boolean
ReadTargetRegister(register_id RegsEnum, target_register *uint64) Boolean
WriteTargetRegister(register_id RegsEnum, value uint64) Boolean
ShowAllRegisters() Boolean
ShowTargetRegister(register_id RegsEnum) Boolean
WriteMemory(destination_address unsafe.Pointer, memory_type DebuggerEditMemoryType, process_id uint32, source_address unsafe.Pointer, number_of_bytes uint32) bool
ReadAllRegisters(guest_registers unsafe.Pointer, extra_registers unsafe.Pointer) bool
ReadTargetRegister(register_id RegsEnum, target_register *uint64) bool
WriteTargetRegister(register_id RegsEnum, value uint64) bool
ShowAllRegisters() bool
ShowTargetRegister(register_id RegsEnum) bool
ContinueDebuggee()
PauseDebuggee()
SetBreakpoint(address uint64, pid uint32, tid uint32, core_numer uint32)
SteppingInstrumentationStepIn() Boolean
SteppingRegularStepIn() Boolean
SteppingStepOver() Boolean
SteppingInstrumentationStepInForTracking() Boolean
SteppingStepOverForGu(last_instruction Boolean) Boolean
StartProcess(path *Wchar) Boolean
StartProcessWithArgs(path *Wchar, arguments *Wchar) Boolean
CommandGetLocalApic(local_apic PlapicPage, is_using_x2apic *Boolean) Boolean
AssembleGetLength(assembly_code *Char, start_address uint64, length *uint32) Boolean
Assemble(assembly_code *Char, start_address uint64, buffer_to_store_assembled_data unsafe.Pointer, buffer_size uint32) Boolean
HwdbgScriptRunScript(script *Char, instance_filepath_to_read *Char, hardware_script_file_path_to_save *Char, initial_bram_buffer_size uint32) Boolean
SteppingInstrumentationStepIn() bool
SteppingRegularStepIn() bool
SteppingStepOver() bool
SteppingInstrumentationStepInForTracking() bool
SteppingStepOverForGu(last_instruction bool) bool
StartProcess(path *Wchar) bool
StartProcessWithArgs(path *Wchar, arguments *Wchar) bool
CommandGetLocalApic(local_apic PlapicPage, is_using_x2apic *bool) bool
AssembleGetLength(assembly_code *Char, start_address uint64, length *uint32) bool
Assemble(assembly_code *Char, start_address uint64, buffer_to_store_assembled_data unsafe.Pointer, buffer_size uint32) bool
HwdbgScriptRunScript(script *Char, instance_filepath_to_read *Char, hardware_script_file_path_to_save *Char, initial_bram_buffer_size uint32) bool
HwdbgScriptEngineWrapperTestParser(Expr *Char)
HardwareScriptInterpreterShowScriptCapabilities(InstanceInfo *HwdbgInstanceInformation)
HardwareScriptInterpreterCheckScriptBufferWithScriptCapabilities(InstanceInfo *HwdbgInstanceInformation, ScriptBuffer unsafe.Pointer, CountOfScriptSymbolChunks uint32, NumberOfStages *uint32, NumberOfOperands *uint32, NumberOfOperandsImplemented *uint32) Boolean
HardwareScriptInterpreterCompressBuffer(Buffer *uint64, BufferLength int32, ScriptVariableLength uint32, BramDataWidth uint32, NewBufferSize *int32, NumberOfBytesPerChunk *int32) Boolean
HardwareScriptInterpreterConvertSymbolToHwdbgShortSymbolBuffer(InstanceInfo *HwdbgInstanceInformation, SymbolBuffer unsafe.Pointer, SymbolBufferLength int32, NumberOfStages uint32, NewShortSymbolBuffer *unsafe.Pointer, NewBufferSize *int32) Boolean
HardwareScriptInterpreterCheckScriptBufferWithScriptCapabilities(InstanceInfo *HwdbgInstanceInformation, ScriptBuffer unsafe.Pointer, CountOfScriptSymbolChunks uint32, NumberOfStages *uint32, NumberOfOperands *uint32, NumberOfOperandsImplemented *uint32) bool
HardwareScriptInterpreterCompressBuffer(Buffer *uint64, BufferLength int32, ScriptVariableLength uint32, BramDataWidth uint32, NewBufferSize *int32, NumberOfBytesPerChunk *int32) bool
HardwareScriptInterpreterConvertSymbolToHwdbgShortSymbolBuffer(InstanceInfo *HwdbgInstanceInformation, SymbolBuffer unsafe.Pointer, SymbolBufferLength int32, NumberOfStages uint32, NewShortSymbolBuffer *unsafe.Pointer, NewBufferSize *int32) bool
HardwareScriptInterpreterFreeHwdbgShortSymbolBuffer(NewShortSymbolBuffer unsafe.Pointer)
ScriptEngineParse(str *byte) unsafe.Pointer
ScriptEngineSetHwdbgInstanceInfo(InstancInfo *HwdbgInstanceInformation) Boolean
ScriptEngineSetHwdbgInstanceInfo(InstancInfo *HwdbgInstanceInformation) bool
PrintSymbolBuffer(SymbolBuffer unsafe.Pointer)
RemoveSymbolBuffer(SymbolBuffer unsafe.Pointer)
PrintSymbol(Symbol unsafe.Pointer)
ScriptEngineConvertNameToAddress(FunctionOrVariableName *byte, WasFound Pboolean) uint64
ScriptEngineConvertNameToAddress(FunctionOrVariableName *byte, WasFound bool) uint64
ScriptEngineLoadFileSymbol(BaseAddress uint64, PdbFileName *byte, CustomModuleName *byte) uint32
ScriptEngineUnloadAllSymbols() uint32
ScriptEngineUnloadModuleSymbol(ModuleName *byte) uint32
ScriptEngineSearchSymbolForMask(SearchMask *byte) uint32
ScriptEngineGetFieldOffset(TypeName *Char, FieldName *Char, FieldOffset *uint32) Boolean
ScriptEngineGetDataTypeSize(TypeName *Char, TypeSize *uint64) Boolean
ScriptEngineCreateSymbolTableForDisassembler(CallbackFunction unsafe.Pointer) Boolean
ScriptEngineConvertFileToPdbPath(LocalFilePath *byte, ResultPath *byte) Boolean
ScriptEngineConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule Boolean) Boolean
ScriptEngineSymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable Boolean, SymbolPath *byte, IsSilentLoad Boolean) Boolean
ScriptEngineShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct Boolean, BufferAddress unsafe.Pointer, AdditionalParameters *byte) Boolean
ScriptEngineGetFieldOffset(TypeName *Char, FieldName *Char, FieldOffset *uint32) bool
ScriptEngineGetDataTypeSize(TypeName *Char, TypeSize *uint64) bool
ScriptEngineCreateSymbolTableForDisassembler(CallbackFunction unsafe.Pointer) bool
ScriptEngineConvertFileToPdbPath(LocalFilePath *byte, ResultPath *byte) bool
ScriptEngineConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule bool) bool
ScriptEngineSymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable bool, SymbolPath *byte, IsSilentLoad bool) bool
ScriptEngineShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct bool, BufferAddress unsafe.Pointer, AdditionalParameters *byte) bool
ScriptEngineSymbolAbortLoading()
ScriptEngineSetTextMessageCallback(Handler unsafe.Pointer)
SymSetTextMessageCallback(Handler unsafe.Pointer)
SymbolAbortLoading()
SymConvertNameToAddress(FunctionOrVariableName *byte, WasFound Pboolean) uint64
SymConvertNameToAddress(FunctionOrVariableName *byte, WasFound bool) uint64
SymLoadFileSymbol(BaseAddress uint64, PdbFileName *byte, CustomModuleName *byte) uint32
SymUnloadAllSymbols() uint32
SymUnloadModuleSymbol(ModuleName *byte) uint32
SymSearchSymbolForMask(SearchMask *byte) uint32
SymGetFieldOffset(TypeName *Char, FieldName *Char, FieldOffset *uint32) Boolean
SymGetDataTypeSize(TypeName *Char, TypeSize *uint64) Boolean
SymCreateSymbolTableForDisassembler(CallbackFunction unsafe.Pointer) Boolean
SymConvertFileToPdbPath(LocalFilePath *byte, ResultPath *byte) Boolean
SymConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule Boolean) Boolean
SymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable Boolean, SymbolPath *byte, IsSilentLoad Boolean) Boolean
SymShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct Boolean, BufferAddress unsafe.Pointer, AdditionalParameters *byte) Boolean
SymQuerySizeof(StructNameOrTypeName *byte, SizeOfField *uint32) Boolean
SymCastingQueryForFiledsAndTypes(StructName *byte, FiledOfStructName *byte, IsStructNamePointerOrNot Pboolean, IsFiledOfStructNamePointerOrNot Pboolean, NewStructOrTypeName **byte, OffsetOfFieldFromTop *uint32, SizeOfField *uint32) Boolean
SymGetFieldOffset(TypeName *Char, FieldName *Char, FieldOffset *uint32) bool
SymGetDataTypeSize(TypeName *Char, TypeSize *uint64) bool
SymCreateSymbolTableForDisassembler(CallbackFunction unsafe.Pointer) bool
SymConvertFileToPdbPath(LocalFilePath *byte, ResultPath *byte) bool
SymConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule bool) bool
SymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable bool, SymbolPath *byte, IsSilentLoad bool) bool
SymShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct bool, BufferAddress unsafe.Pointer, AdditionalParameters *byte) bool
SymQuerySizeof(StructNameOrTypeName *byte, SizeOfField *uint32) bool
SymCastingQueryForFiledsAndTypes(StructName *byte, FiledOfStructName *byte, IsStructNamePointerOrNot bool, IsFiledOfStructNamePointerOrNot bool, NewStructOrTypeName **byte, OffsetOfFieldFromTop *uint32, SizeOfField *uint32) bool
}

type hyperDbg struct {
Expand Down Expand Up @@ -172,7 +172,7 @@ func (h *hyperDbg) TestCommandParserShowTokens(command *Char) {
panic("implement me")
}

func (h *hyperDbg) SetupPathForFilename(filename *Char, file_location *Char, buffer_len uint32, check_file_existence Boolean) {
func (h *hyperDbg) SetupPathForFilename(filename *Char, file_location *Char, buffer_len uint32, check_file_existence bool) {
//TODO implement me
panic("implement me")
}
Expand Down Expand Up @@ -207,7 +207,7 @@ func (h *hyperDbg) ContinuePreviousCommand() {
panic("implement me")
}

func (h *hyperDbg) CheckMultilineCommand(current_command *Char, reset Boolean) {
func (h *hyperDbg) CheckMultilineCommand(current_command *Char, reset bool) {
//TODO implement me
panic("implement me")
}
Expand All @@ -232,12 +232,12 @@ func (h *hyperDbg) ConnectRemoteDebugger(ip *Char, port *Char) {
panic("implement me")
}

func (h *hyperDbg) ConnectRemoteDebuggerUsingComPort(port_name *Char, baudrate Dword, pause_after_connection Boolean) {
func (h *hyperDbg) ConnectRemoteDebuggerUsingComPort(port_name *Char, baudrate Dword, pause_after_connection bool) {
//TODO implement me
panic("implement me")
}

func (h *hyperDbg) ConnectRemoteDebuggerUsingNamedPipe(named_pipe *Char, pause_after_connection Boolean) {
func (h *hyperDbg) ConnectRemoteDebuggerUsingNamedPipe(named_pipe *Char, pause_after_connection bool) {
//TODO implement me
panic("implement me")
}
Expand All @@ -257,7 +257,7 @@ func (h *hyperDbg) GetKernelBase() uint64 {
panic("implement me")
}

func (h *hyperDbg) ReadMemory(target_address uint64, memory_type DebuggerReadMemoryType, reading_Type DebuggerReadReadingType, pid uint32, size uint32, get_address_mode Boolean, address_mode *DebuggerReadMemoryAddressMode, target_buffer_to_store *Byte, return_length *uint32) {
func (h *hyperDbg) ReadMemory(target_address uint64, memory_type DebuggerReadMemoryType, reading_Type DebuggerReadReadingType, pid uint32, size uint32, get_address_mode bool, address_mode *DebuggerReadMemoryAddressMode, target_buffer_to_store *Byte, return_length *uint32) {
//TODO implement me
panic("implement me")
}
Expand Down Expand Up @@ -332,7 +332,7 @@ func (h *hyperDbg) SteppingInstrumentationStepInForTracking() {
panic("implement me")
}

func (h *hyperDbg) SteppingStepOverForGu(last_instruction Boolean) {
func (h *hyperDbg) SteppingStepOverForGu(last_instruction bool) {
//TODO implement me
panic("implement me")
}
Expand All @@ -347,7 +347,7 @@ func (h *hyperDbg) StartProcessWithArgs(path *Wchar, arguments *Wchar) {
panic("implement me")
}

func (h *hyperDbg) CommandGetLocalApic(local_apic PlapicPage, is_using_x2apic *Boolean) {
func (h *hyperDbg) CommandGetLocalApic(local_apic PlapicPage, is_using_x2apic *bool) {
//TODO implement me
panic("implement me")
}
Expand Down Expand Up @@ -422,7 +422,7 @@ func (h *hyperDbg) PrintSymbol(Symbol unsafe.Pointer) {
panic("implement me")
}

func (h *hyperDbg) ScriptEngineConvertNameToAddress(FunctionOrVariableName *byte, WasFound Pboolean) uint64 {
func (h *hyperDbg) ScriptEngineConvertNameToAddress(FunctionOrVariableName *byte, WasFound bool) uint64 {
//TODO implement me
panic("implement me")
}
Expand Down Expand Up @@ -467,17 +467,17 @@ func (h *hyperDbg) ScriptEngineConvertFileToPdbPath(LocalFilePath *byte, ResultP
panic("implement me")
}

func (h *hyperDbg) ScriptEngineConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule Boolean) {
func (h *hyperDbg) ScriptEngineConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule bool) {
//TODO implement me
panic("implement me")
}

func (h *hyperDbg) ScriptEngineSymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable Boolean, SymbolPath *byte, IsSilentLoad Boolean) {
func (h *hyperDbg) ScriptEngineSymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable bool, SymbolPath *byte, IsSilentLoad bool) {
//TODO implement me
panic("implement me")
}

func (h *hyperDbg) ScriptEngineShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct Boolean, BufferAddress unsafe.Pointer, AdditionalParameters *byte) {
func (h *hyperDbg) ScriptEngineShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct bool, BufferAddress unsafe.Pointer, AdditionalParameters *byte) {
//TODO implement me
panic("implement me")
}
Expand All @@ -502,7 +502,7 @@ func (h *hyperDbg) SymbolAbortLoading() {
panic("implement me")
}

func (h *hyperDbg) SymConvertNameToAddress(FunctionOrVariableName *byte, WasFound Pboolean) uint64 {
func (h *hyperDbg) SymConvertNameToAddress(FunctionOrVariableName *byte, WasFound bool) uint64 {
//TODO implement me
panic("implement me")
}
Expand Down Expand Up @@ -547,17 +547,17 @@ func (h *hyperDbg) SymConvertFileToPdbPath(LocalFilePath *byte, ResultPath *byte
panic("implement me")
}

func (h *hyperDbg) SymConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule Boolean) {
func (h *hyperDbg) SymConvertFileToPdbFileAndGuidAndAgeDetails(LocalFilePath *byte, PdbFilePath *byte, GuidAndAgeDetails *byte, Is32BitModule bool) {
//TODO implement me
panic("implement me")
}

func (h *hyperDbg) SymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable Boolean, SymbolPath *byte, IsSilentLoad Boolean) {
func (h *hyperDbg) SymbolInitLoad(BufferToStoreDetails unsafe.Pointer, StoredLength uint32, DownloadIfAvailable bool, SymbolPath *byte, IsSilentLoad bool) {
//TODO implement me
panic("implement me")
}

func (h *hyperDbg) SymShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct Boolean, BufferAddress unsafe.Pointer, AdditionalParameters *byte) {
func (h *hyperDbg) SymShowDataBasedOnSymbolTypes(TypeName *byte, Address uint64, IsStruct bool, BufferAddress unsafe.Pointer, AdditionalParameters *byte) {
//TODO implement me
panic("implement me")
}
Expand All @@ -567,7 +567,7 @@ func (h *hyperDbg) SymQuerySizeof(StructNameOrTypeName *byte, SizeOfField *uint3
panic("implement me")
}

func (h *hyperDbg) SymCastingQueryForFiledsAndTypes(StructName *byte, FiledOfStructName *byte, IsStructNamePointerOrNot Pboolean, IsFiledOfStructNamePointerOrNot Pboolean, NewStructOrTypeName **byte, OffsetOfFieldFromTop *uint32, SizeOfField *uint32) {
func (h *hyperDbg) SymCastingQueryForFiledsAndTypes(StructName *byte, FiledOfStructName *byte, IsStructNamePointerOrNot bool, IsFiledOfStructNamePointerOrNot bool, NewStructOrTypeName **byte, OffsetOfFieldFromTop *uint32, SizeOfField *uint32) {
//TODO implement me
panic("implement me")
}

0 comments on commit 3675c48

Please sign in to comment.