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

.status command More...

#include "pch.h"

Functions

VOID CommandStatusHelp ()
 help of the .status command
 
VOID CommandStatus (vector< string > SplitCommand, string Command)
 .status and status command handler
 

Variables

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_IsConnectedToRemoteDebuggee
 Shows whether the current debugger is the host and connected to a remote debuggee (guest)
 
BOOLEAN g_IsConnectedToRemoteDebugger
 Shows whether the current system is a guest (debuggee) and a remote debugger is connected to this system.
 
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest)
 
BOOLEAN g_IsSerialConnectedToRemoteDebugger
 Shows if the debugger was connected to remote debugger (A remote host)
 
string g_ServerPort
 In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.
 
string g_ServerIp
 In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.
 

Detailed Description

.status command

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

Function Documentation

◆ CommandStatus()

VOID CommandStatus ( vector< string > SplitCommand,
string Command )

.status and status command handler

Parameters
SplitCommand
Command
Returns
VOID
51{
52 if (SplitCommand.size() != 1)
53 {
54 ShowMessages("incorrect use of the '.status'\n\n");
56 }
57
59 {
60 //
61 // Connected to a remote debugger (serial port)
62 //
63 ShowMessages("remote debugging - debugger ('debugger mode')\n");
64 }
66 {
67 //
68 // Connected to a remote debuggee (serial port)
69 //
70 ShowMessages("remote debugging - debuggee ('debugger mode')\n");
71 }
73 {
74 //
75 // Connected to a remote debuggee
76 //
77 ShowMessages("remote debugging ('vmi mode'), ip : %s:%s \n",
78 g_ServerIp.c_str(),
79 g_ServerPort.c_str());
80 }
82 {
83 //
84 // Connected to a local system
85 //
86 ShowMessages("local debugging ('vmi mode')\n");
87 }
89 {
90 //
91 // It's computer connect to a remote machine (this
92 // message shouldn't be showed)
93 //
94 ShowMessages("a remote debugger connected to this system in ('vmi "
95 "mode'), ip : %s:%s \n",
96 g_ServerIp.c_str(),
97 g_ServerPort.c_str());
98 }
99 else
100 {
101 //
102 // we never should see this message
103 //
104 ShowMessages("err, you're not connected to any instance of HyperDbg\n");
105 }
106}
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
BOOLEAN g_IsSerialConnectedToRemoteDebugger
Shows if the debugger was connected to remote debugger (A remote host)
Definition globals.h:238
BOOLEAN g_IsConnectedToRemoteDebuggee
Shows whether the current debugger is the host and connected to a remote debuggee (guest)
Definition globals.h:74
string g_ServerPort
In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e....
Definition globals.h:110
VOID CommandStatusHelp()
help of the .status command
Definition status.cpp:31
BOOLEAN g_IsConnectedToRemoteDebugger
Shows whether the current system is a guest (debuggee) and a remote debugger is connected to this sys...
Definition globals.h:81
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest)
Definition globals.h:231
BOOLEAN g_IsConnectedToHyperDbgLocally
Shows whether the user is allowed to use 'load' command to load modules locally in VMI (virtual machi...
Definition globals.h:67
string g_ServerIp
In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e....
Definition globals.h:117

◆ CommandStatusHelp()

VOID CommandStatusHelp ( )

help of the .status command

Returns
VOID
32{
33 ShowMessages(".status | status : gets the status of current debugger in local "
34 "system (if you connected to a remote system then '.status' "
35 "shows the state of current debugger, while 'status' shows the "
36 "state of remote debuggee).\n\n");
37
38 ShowMessages("syntax : \t.status\n");
39 ShowMessages("syntax : \tstatus\n");
40}

Variable Documentation

◆ 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_IsConnectedToRemoteDebuggee

BOOLEAN g_IsConnectedToRemoteDebuggee
extern

Shows whether the current debugger is the host and connected to a remote debuggee (guest)

◆ g_IsConnectedToRemoteDebugger

BOOLEAN g_IsConnectedToRemoteDebugger
extern

Shows whether the current system is a guest (debuggee) and a remote debugger is connected to this system.

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

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

◆ g_IsSerialConnectedToRemoteDebugger

BOOLEAN g_IsSerialConnectedToRemoteDebugger
extern

Shows if the debugger was connected to remote debugger (A remote host)

◆ g_ServerIp

string g_ServerIp
extern

In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.

◆ g_ServerPort

string g_ServerPort
extern

In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.