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

sleep command help

Parameters
SplitCommand
Command
Returns
VOID
38{
39 UINT32 MillisecondsTime = 0;
40
41 if (SplitCommand.size() != 2)
42 {
43 ShowMessages("incorrect use of the 'sleep'\n\n");
45 return;
46 }
47
48 if (!ConvertStringToUInt32(SplitCommand.at(1), &MillisecondsTime))
49 {
51 "please specify a correct hex value for time (milliseconds)\n\n");
53 return;
54 }
55 Sleep(MillisecondsTime);
56}
unsigned int UINT32
Definition BasicTypes.h:48
BOOLEAN ConvertStringToUInt32(string TextToConvert, PUINT32 Result)
check and convert string to a 32 bit unsigned it and also check for special notations like 0x etc.
Definition common.cpp:347
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
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}