HyperDbg/hyperdbg/libhyperdbg/code/debugger/commands/debugging-commands/x.cpp

56 lines
1.2 KiB
C++
Raw Permalink Normal View History

2021-05-31 20:13:18 +04:30
/**
* @file x.cpp
2022-01-18 22:38:56 +03:30
* @author Sina Karvandi (sina@hyperdbg.org)
2021-05-31 20:13:18 +04:30
* @brief parse symbols
* @details
* @version 0.1
* @date 2021-05-31
*
* @copyright This project is released under the GNU Public License v3.
*
*/
#include "pch.h"
2021-05-31 20:13:18 +04:30
/**
2023-07-13 16:05:42 +09:00
* @brief help of the x command
2021-05-31 20:13:18 +04:30
*
* @return VOID
*/
VOID
CommandXHelp()
{
2022-04-10 22:24:56 +04:30
ShowMessages("x : searches and shows symbols (wildcard) and corresponding addresses.\n\n");
ShowMessages("syntax : \tx [Module!Name (wildcard string)]\n");
ShowMessages("\n");
2021-05-31 20:13:18 +04:30
ShowMessages("\t\te.g : x nt!ExAllocatePoolWithTag \n");
ShowMessages("\t\te.g : x nt!ExAllocatePool* \n");
ShowMessages("\t\te.g : x nt!* \n");
}
/**
* @brief x command handler
*
2024-07-30 14:17:06 +09:00
* @param CommandTokens
* @param Command
2024-07-30 14:17:06 +09:00
*
2021-05-31 20:13:18 +04:30
* @return VOID
*/
VOID
CommandX(vector<CommandToken> CommandTokens, string Command)
2021-05-31 20:13:18 +04:30
{
2024-07-30 14:17:06 +09:00
if (CommandTokens.size() != 2)
2021-05-31 20:13:18 +04:30
{
2024-07-30 14:17:06 +09:00
ShowMessages("incorrect use of the '%s'\n\n",
GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
2021-05-31 20:13:18 +04:30
CommandXHelp();
return;
}
//
// Search for mask
2021-05-31 20:13:18 +04:30
//
2024-07-30 14:17:06 +09:00
ScriptEngineSearchSymbolForMaskWrapper(GetCaseSensitiveStringFromCommandToken(CommandTokens.at(1)).c_str());
2021-05-31 20:13:18 +04:30
}