HyperDbg/hyperdbg/libhyperdbg/code/debugger/commands/meta-commands/cls.cpp

48 lines
873 B
C++
Raw Permalink Normal View History

/**
* @file cls.c
2022-01-18 22:38:56 +03:30
* @author Sina Karvandi (sina@hyperdbg.org)
* @brief .cls, cls, clear commands implementations
* @details
* @version 0.1
* @date 2020-05-27
*
* @copyright This project is released under the GNU Public License v3.
*
*/
#include "pch.h"
2020-08-28 04:03:12 -07:00
/**
2023-07-13 16:05:42 +09:00
* @brief help of the .cls command
2021-02-10 15:19:01 -08:00
*
* @return VOID
2020-08-28 04:03:12 -07:00
*/
2021-03-22 18:19:39 +04:30
VOID
2024-07-30 15:07:17 +09:00
CommandClsHelp()
2021-03-22 18:19:39 +04:30
{
ShowMessages(".cls : clears the screen.\n\n");
2021-03-22 18:19:39 +04:30
ShowMessages("syntax : \t.cls\n");
2020-07-25 03:32:04 -07:00
}
2020-08-28 04:03:12 -07:00
/**
* @brief .cls command handler
2023-01-18 20:23:40 +09:00
*
2024-07-30 15:07:17 +09:00
* @param CommandTokens
* @param Command
2024-07-30 15:07:17 +09:00
*
2021-02-10 15:19:01 -08:00
* @return VOID
2020-08-28 04:03:12 -07:00
*/
2021-03-22 18:19:39 +04:30
VOID
CommandCls(vector<CommandToken> CommandTokens, string Command)
2021-03-22 18:19:39 +04:30
{
2024-07-30 15:07:17 +09:00
if (CommandTokens.size() != 1)
{
ShowMessages("incorrect use of the '%s'\n\n",
GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
CommandClsHelp();
return;
}
2021-03-22 18:19:39 +04:30
system("cls");
2021-02-10 15:19:01 -08:00
}