add length argument to the .pagein command

This commit is contained in:
Sinaei 2023-11-22 15:00:49 +09:00
parent 5ef8f5c089
commit aa6058768b
2 changed files with 13 additions and 22 deletions

View file

@ -4,12 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.7.0.0] - 2023-XX-XX
## [0.7.0.0] - 2023-11-22
New release of the HyperDbg Debugger.
### Added
- HyperDbg now applies events immediately as implemented in the "instant events" mechanism ([link](https://docs.hyperdbg.org/tips-and-tricks/misc/instant-events))
- **!crwrite** - Control Register Modification Event ([link](https://docs.hyperdbg.org/commands/extension-commands/crwrite))
- The Event Forwarding mechanism is now supported in the Debugger Mode ([link](https://docs.hyperdbg.org/tips-and-tricks/misc/event-forwarding))
- The Event Forwarding mechanism now supports external modules (DLLs) ([link](https://docs.hyperdbg.org/tips-and-tricks/misc/event-forwarding))
- **event_clear(EventId)** function in script engine ([link](https://docs.hyperdbg.org/commands/scripting-language/functions/events/event_clear))
@ -18,7 +17,7 @@ New release of the HyperDbg Debugger.
- **strlen** and **wcslen** functions now support string and wide-character string as the input ([link](https://docs.hyperdbg.org/commands/scripting-language/functions/strings/strlen))([link](https://docs.hyperdbg.org/commands/scripting-language/functions/strings/wcslen))
- **strcmp(Str1, Str2)**, **wcscmp(WStr1, WStr2)** and **memcmp(Ptr1, Ptr2, Num)** functions in script engine thanks to [@xmaple555](https://github.com/xmaple555) ([link](https://docs.hyperdbg.org/commands/scripting-language/functions/strings/strcmp))([link](https://docs.hyperdbg.org/commands/scripting-language/functions/strings/wcscmp))([link](https://docs.hyperdbg.org/commands/scripting-language/functions/memory/memcmp))
- The debug break interception (\#DB) manipulation option is added to the 'test' command ([link](https://docs.hyperdbg.org/commands/debugging-commands/test))
- The '.pagein' command, now supports a range of addresses to bring them into the RAM ([link](https://docs.hyperdbg.org/commands/meta-commands/.pagein))
- The '.pagein' command, now supports address ranges (length in bytes) to bring multiple pages into the RAM ([link](https://docs.hyperdbg.org/commands/meta-commands/.pagein))
### Changed
- Fix the problem with the "less than" and the "greater than" operators for signed numbers thanks to [@xmaple555](https://github.com/xmaple555) ([link](https://github.com/HyperDbg/HyperDbg/pull/279))
@ -34,6 +33,7 @@ New release of the HyperDbg Debugger.
- Fix adding pseudo-registers with underscore in the script engine ([link](https://github.com/HyperDbg/HyperDbg/pull/313))
- Fix the boolean expression interpretation in **if** conditions in the script engine ([link](https://github.com/HyperDbg/HyperDbg/issues/311))
- HyperDbg now intercepts all debug breaks (\#DBs) if it's not explicitly asked not to by using the 'test' command ([link](https://docs.hyperdbg.org/commands/debugging-commands/test))
- Fix '%d' bug in script engine ([link](https://github.com/HyperDbg/HyperDbg/pull/318))
## [0.6.0.0-beta] - 2023-09-25
New release of the HyperDbg Debugger.

View file

@ -27,22 +27,22 @@ CommandPageinHelp()
{
ShowMessages(".pagein : brings the page in, making it available in the RAM.\n\n");
ShowMessages("syntax : \t.pagein [Mode (string)] [VirtualAddress (hex)]\n");
ShowMessages("syntax : \t.pagein [Mode (string)] [VirtualAddressFrom (hex)] [VirtualAddressTo (hex)]\n");
ShowMessages("syntax : \t.pagein [Mode (string)] [l Length (hex)]\n");
ShowMessages("syntax : \t.pagein [Mode (string)] [VirtualAddress (hex)] [l Length (hex)]\n");
ShowMessages("\n");
ShowMessages("\t\te.g : .pagein fffff801deadbeef\n");
ShowMessages("\t\te.g : .pagein 00007ff8349f2224 00007ff8349f8224\n");
ShowMessages("\t\te.g : .pagein 00007ff8349f2224 l 1a000\n");
ShowMessages("\t\te.g : .pagein u 00007ff8349f2224\n");
ShowMessages("\t\te.g : .pagein w 00007ff8349f2224\n");
ShowMessages("\t\te.g : .pagein f 00007ff8349f2224\n");
ShowMessages("\t\te.g : .pagein pw 00007ff8349f2224\n");
ShowMessages("\t\te.g : .pagein wu 00007ff8349f2224\n");
ShowMessages("\t\te.g : .pagein wu 00007ff8349f2224 00007ff8349f9224\n");
ShowMessages("\t\te.g : .pagein wu 00007ff8349f2224 l 6000\n");
ShowMessages("\t\te.g : .pagein pf @rax\n");
ShowMessages("\t\te.g : .pagein uf @rip+@rcx\n");
ShowMessages("\t\te.g : .pagein pwu @rax+5\n");
ShowMessages("\t\te.g : .pagein pwu @rax @rax+(2*4096)\n");
ShowMessages("\t\te.g : .pagein pwu @rax l 2000\n");
ShowMessages("\n");
ShowMessages("valid mode formats: \n");
@ -359,19 +359,6 @@ CommandPagein(vector<string> SplittedCommand, string Command)
return;
}
}
else if (TargetAddressTo == 0)
{
if (!SymbolConvertNameOrExprToAddress(SplittedCommandCaseSensitive.at(IndexInCommandCaseSensitive - 1),
&TargetAddressTo))
{
//
// Couldn't resolve or unkonwn parameter
//
ShowMessages("err, couldn't resolve error at '%s'\n",
SplittedCommandCaseSensitive.at(IndexInCommandCaseSensitive - 1).c_str());
return;
}
}
else
{
//
@ -405,10 +392,14 @@ CommandPagein(vector<string> SplittedCommand, string Command)
// If the user didn't specified a range, then only one page will be
// paged-in; so we use the same AddressFrom and AddressTo
//
if (TargetAddressTo == 0)
if (Length == 0)
{
TargetAddressTo = TargetAddressFrom;
}
else
{
TargetAddressTo = TargetAddressFrom + Length;
}
//
// Send the request