HyperDbg Debugger
Loading...
Searching...
No Matches
exit.cpp File Reference

exit command More...

#include "pch.h"

Functions

VOID CommandExitHelp ()
 help of the exit command
VOID CommandExit (vector< CommandToken > CommandTokens, string Command)
 exit command handler

Variables

HANDLE g_DeviceHandle
 Holds the global handle of device which is used to send the request to the kernel by IOCTL, this handle is not used for IRP Pending of message tracing this handle is used in KD VMM.
BOOLEAN g_IsConnectedToHyperDbgLocally
 Shows whether the user is allowed to use 'load' command to load modules locally in VMI (virtual machine introspection) mode.
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest).
BOOLEAN g_IsKdModuleLoaded
 shows whether the kernel debugger (KD) module is loaded or not
BOOLEAN g_IsVmmModuleLoaded
 shows whether the VMM module is loaded or not

Detailed Description

exit command

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-05-27

Function Documentation

◆ CommandExit()

VOID CommandExit ( vector< CommandToken > CommandTokens,
string Command )

exit command handler

Parameters
CommandTokens
Command
Returns
VOID
47{
48 if (CommandTokens.size() != 1)
49 {
50 ShowMessages("incorrect use of the '%s'\n\n",
51 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
53 return;
54 }
55
57 {
58 //
59 // It is in VMI mode
60 //
61
62 //
63 // unload and exit if the any module is loaded
64 //
66 {
67 //
68 // Unload all modules
69 //
71 }
72 }
74 {
75 //
76 // It is in debugger mode
77 //
78
80 }
81
82 exit(0);
83}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
VOID CommandExitHelp()
help of the exit command
Definition exit.cpp:29
BOOLEAN g_IsConnectedToHyperDbgLocally
Shows whether the user is allowed to use 'load' command to load modules locally in VMI (virtual machi...
Definition globals.h:89
BOOLEAN KdCloseConnection()
Send close packet to the debuggee and debugger.
Definition kd.cpp:3056
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
INT HyperDbgUnloadAllModules()
unload all modules (KD, VMM, HyperTrace, etc.)
Definition libhyperdbg.cpp:628

◆ CommandExitHelp()

VOID CommandExitHelp ( )

help of the exit command

Returns
VOID
30{
31 ShowMessages(
32 "exit : unloads and uninstalls the drivers and closes the debugger.\n\n");
33
34 ShowMessages("syntax : \texit\n");
35}

Variable Documentation

◆ g_DeviceHandle

HANDLE g_DeviceHandle
extern

Holds the global handle of device which is used to send the request to the kernel by IOCTL, this handle is not used for IRP Pending of message tracing this handle is used in KD VMM.

◆ g_IsConnectedToHyperDbgLocally

BOOLEAN g_IsConnectedToHyperDbgLocally
extern

Shows whether the user is allowed to use 'load' command to load modules locally in VMI (virtual machine introspection) mode.

◆ g_IsKdModuleLoaded

BOOLEAN g_IsKdModuleLoaded
extern

shows whether the kernel debugger (KD) module is loaded or not

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

Shows if the debugger was connected to remote debuggee over (A remote guest).

◆ g_IsVmmModuleLoaded

BOOLEAN g_IsVmmModuleLoaded
extern

shows whether the VMM module is loaded or not