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

sleep command More...

#include "pch.h"

Functions

VOID CommandSleepHelp ()
 help of the sleep command
VOID CommandSleep (vector< CommandToken > CommandTokens, string Command)
 sleep command help

Detailed Description

sleep command

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

Function Documentation

◆ CommandSleep()

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

sleep command help

Parameters
CommandTokens
Command
Returns
VOID
39{
40 UINT32 MillisecondsTime = 0;
41
42 if (CommandTokens.size() != 2)
43 {
44 ShowMessages("incorrect use of the '%s'\n\n",
45 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
47 return;
48 }
49
50 if (!ConvertTokenToUInt32(CommandTokens.at(1), &MillisecondsTime))
51 {
52 ShowMessages(
53 "please specify a correct hex value for time (milliseconds)\n\n");
55 return;
56 }
57 Sleep(MillisecondsTime);
58}
unsigned int UINT32
Definition BasicTypes.h:54
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN ConvertTokenToUInt32(CommandToken TargetToken, PUINT32 Result)
check and convert command token to a 32 bit unsigned integer
Definition common.cpp:546
VOID CommandSleepHelp()
help of the sleep command
Definition sleep.cpp:20

◆ CommandSleepHelp()

VOID CommandSleepHelp ( )

help of the sleep command

Returns
VOID
21{
22 ShowMessages("sleep : sleeps the debugger; this command is used in scripts, it doesn't breaks "
23 "the debugger but the debugger still shows the buffers received "
24 "from kernel.\n\n");
25
26 ShowMessages("syntax : \tsleep [MillisecondsTime (hex)]\n");
27}