HyperDbg Debugger
Loading...
Searching...
No Matches
hyperdbg-app.cpp File Reference

Controller of the reversing machine's module. More...

#include "pch.h"

Functions

int hyperdbg_show_messages (const char *Text)
 Show messages.
 
int hyperdbg_show_messages_shared_buffer ()
 Show messages (shared buffer)
 
int hyperdbg_load ()
 Load the driver.
 
int main ()
 main function
 

Variables

PVOID g_SharedMessageBuffer = NULL
 

Detailed Description

Controller of the reversing machine's module.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.2
Date
2023-02-01

Function Documentation

◆ hyperdbg_load()

int hyperdbg_load ( )

Load the driver.

Returns
int return zero if it was successful or non-zero if there was error
55{
56 char CpuId[13] = {0};
57
58 //
59 // Read the vendor string
60 //
62
63 printf("current processor vendor is : %s\n", CpuId);
64
65 if (strcmp(CpuId, "GenuineIntel") == 0)
66 {
67 printf("virtualization technology is vt-x\n");
68 }
69 else
70 {
71 printf("this program is not designed to run in a non-VT-x "
72 "environment !\n");
73 return 1;
74 }
75
76 //
77 // Detect if the processor supports vmx operation
78 //
80 {
81 printf("vmx operation is supported by your processor\n");
82 }
83 else
84 {
85 printf("vmx operation is not supported by your processor\n");
86 return 1;
87 }
88
89 //
90 // Set callback function for showing messages
91 //
92 // hyperdbg_u_set_text_message_callback(hyperdbg_show_messages);
93
94 //
95 // Test intepreter with shared buffer
96 //
98
99 //
100 // Test interpreter
101 //
102 hyperdbg_u_interpreter((CHAR *)"help !monitor");
103
104 return 0;
105}
char CHAR
Definition BasicTypes.h:31
IMPORT_EXPORT_LIBHYPERDBG PVOID hyperdbg_u_set_text_message_callback_using_shared_buffer(PVOID handler)
Set the function callback that will be called if any message needs to be shown (using shared buffer m...
Definition export.cpp:144
IMPORT_EXPORT_LIBHYPERDBG INT hyperdbg_u_interpreter(CHAR *command)
Interprets the command.
Definition export.cpp:105
IMPORT_EXPORT_LIBHYPERDBG VOID hyperdbg_u_read_vendor_string(CHAR *)
Read the vendor string of the CPU.
Definition export.cpp:39
IMPORT_EXPORT_LIBHYPERDBG BOOLEAN hyperdbg_u_detect_vmx_support()
Detects the support of VMX.
Definition export.cpp:27
int hyperdbg_show_messages_shared_buffer()
Show messages (shared buffer)
Definition hyperdbg-app.cpp:39
PVOID g_SharedMessageBuffer
Definition hyperdbg-app.cpp:15

◆ hyperdbg_show_messages()

int hyperdbg_show_messages ( const char * Text)

Show messages.

Parameters
Text
Returns
int
25{
26 printf("Test in the handler | ");
27 printf("%s\n", Text);
28
29 return 0;
30}

◆ hyperdbg_show_messages_shared_buffer()

int hyperdbg_show_messages_shared_buffer ( )

Show messages (shared buffer)

Parameters
Text
Returns
int
40{
41 printf("Test in the handler (shared buffer) | ");
42 printf("%s\n", (char *)g_SharedMessageBuffer);
43
44 return 0;
45}

◆ main()

int main ( )

main function

Returns
int
114{
115 if (hyperdbg_load() == 0)
116 {
117 //
118 // HyperDbg driver loaded successfully
119 //
120 // hyperdbg_unload();
121 }
122 else
123 {
124 printf("err, in loading HyperDbg\n");
125 }
126}
int hyperdbg_load()
Load the driver.
Definition hyperdbg-app.cpp:54

Variable Documentation

◆ g_SharedMessageBuffer

PVOID g_SharedMessageBuffer = NULL