From f54af30abc5b14f3bdd3566bf8813afacb0e8ef8 Mon Sep 17 00:00:00 2001 From: Admin <2762713521@qq.com> Date: Sun, 14 Jul 2024 17:45:56 +0800 Subject: [PATCH] init commit --- sdk/sdk.go | 2 +- sdk/sdk_test.go | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/sdk.go b/sdk/sdk.go index 8819c45d..e1fadef7 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -1454,7 +1454,7 @@ type PdebuggerRemotePacket = *DebuggerRemotePacket // @brief Callback type that can be used to be used // as a custom ShowMessages function -type Callback = unsafe.Pointer +type Callback = *Char // @brief The structure of user-input packet in HyperDbg type PdebuggeeUserInputPacket = *DebuggeeUserInputPacket diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 4332d9c6..ce480f68 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -18,7 +18,15 @@ func TestSdk(t *testing.T) { assert.True(t, VmxSupportDetection()) assert.True(t, SetCustomDriverPathEx(SysPath)) - // SetTextMessageCallback() + log := "" + SetTextMessageCallback(StringToBytePointer(log)) + go func() { + for { + if log != "" { + println(log) + } + } + }() mylog.Trace("InstallVmmDriver", InstallVmmDriver())