HyperDbg/hyperdbg/hprdbgctrl/code/debugger/commands/debugging-commands/sleep.cpp
Behrooz Abbassi f817cbb801
Refactor: Improve projects configurations
- Improve Precompiled header usage
- Change "Output Directory" and "Intermediate Directory" of all projects to the same values
- Discard pdb files from release file
2022-05-04 16:38:21 -07:00

56 lines
1.2 KiB
C++

/**
* @file sleep.cpp
* @author Sina Karvandi (sina@hyperdbg.org)
* @brief sleep command
* @details
* @version 0.1
* @date 2020-07-25
*
* @copyright This project is released under the GNU Public License v3.
*
*/
#include "pch.h"
/**
* @brief help of sleep command
*
* @return VOID
*/
VOID
CommandSleepHelp()
{
ShowMessages("sleep : sleeps the debugger; this command is used in scripts, it doesn't breaks "
"the debugger but the debugger still shows the buffers received "
"from kernel.\n\n");
ShowMessages("syntax : \tsleep [MillisecondsTime (hex)]\n");
}
/**
* @brief sleep command help
*
* @param SplittedCommand
* @param Command
* @return VOID
*/
VOID
CommandSleep(vector<string> SplittedCommand, string Command)
{
UINT32 MillisecondsTime = 0;
if (SplittedCommand.size() != 2)
{
ShowMessages("incorrect use of 'sleep'\n\n");
CommandSleepHelp();
return;
}
if (!ConvertStringToUInt32(SplittedCommand.at(1), &MillisecondsTime))
{
ShowMessages(
"please specify a correct hex value for time (milliseconds)\n\n");
CommandSleepHelp();
return;
}
Sleep(MillisecondsTime);
}