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< CommandToken > CommandTokens, 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< CommandToken > CommandTokens,
string Command )

.status and status command handler

Parameters
CommandTokens
Command
Returns
VOID
52{
53 if (CommandTokens.size() != 1)
54 {
55 ShowMessages("incorrect use of the '%s'\n\n",
56 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
58 }
59
61 {
62 //
63 // Connected to a remote debugger (serial port)
64 //
65 ShowMessages("remote debugging - debugger ('debugger mode')\n");
66 }
68 {
69 //
70 // Connected to a remote debuggee (serial port)
71 //
72 ShowMessages("remote debugging - debuggee ('debugger mode')\n");
73 }
75 {
76 //
77 // Connected to a remote debuggee
78 //
79 ShowMessages("remote debugging ('vmi mode'), ip : %s:%s \n",
80 g_ServerIp.c_str(),
81 g_ServerPort.c_str());
82 }
84 {
85 //
86 // Connected to a local system
87 //
88 ShowMessages("local debugging ('vmi mode')\n");
89 }
91 {
92 //
93 // It's computer connect to a remote machine (this
94 // message shouldn't be showed)
95 //
96 ShowMessages("a remote debugger connected to this system in ('vmi "
97 "mode'), ip : %s:%s \n",
98 g_ServerIp.c_str(),
99 g_ServerPort.c_str());
100 }
101 else
102 {
103 //
104 // we never should see this message
105 //
106 ShowMessages("err, you're not connected to any instance of HyperDbg\n");
107 }
108}
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
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:132
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:139
BOOLEAN g_IsConnectedToRemoteDebuggee
Shows whether the current debugger is the host and connected to a remote debuggee (guest).
Definition globals.h:96
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 g_IsSerialConnectedToRemoteDebugger
Shows if the debugger was connected to remote debugger (A remote host).
Definition rev.cpp:18
BOOLEAN g_IsConnectedToRemoteDebugger
Shows whether the current system is a guest (debuggee) and a remote debugger is connected to this sys...
Definition globals.h:103
VOID CommandStatusHelp()
help of the .status command
Definition status.cpp:31

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