? (evaluate and execute expressions and scripts in debuggee)
Description of the '?' command in HyperDbg.
Last updated
0: kHyperDbg> ? printf("The RAX register is: %llx at Process Name: %s (pid: %x)", @rax, $pname, $pid);0: kHyperDbg> ? @rax = 0x55; // change the RAX register value
0: kHyperDbg> ? @cr0 = @cr0 | 0x4; // set the third bit of CR0 register
0: kHyperDbg> ? @zf = 1; // set the Zero Flag
0: kHyperDbg> ? @ebx = @ecx + 10 + @ax; // set the value of EBX register0: kHyperDbg> ? {
if (@rax == 55) {
printf("rax is equal to 0x55");
}
}
0: kHyperDbg> ? {
if (poi(@rcx + 0x10) == ffff7080deadbeef && @rdx != 55 || $pid == 4) {
printf("condition is met\n");
}
}
0: kHyperDbg> ? {
if (check_address(@r11) == 1) {
printf("address is valid.\n");
}
else
{
printf("address is invalid.\n");
}
}0: kHyperDbg> ? {
for (i = 0; i < 10 ; i++) {
for (j = 0; j < 10; j++) {
printf("%d, %d\n", i, j);
}
}
}0: kHyperDbg> ? {
if (eq(@r11, 0x12345678deadbeef) == 1) {
printf("changes are applied.\n");
}
else {
printf("changes are NOT applied.\n");
}
}? {
printf("First argument is : %llx\n", $arg1);
printf("Result of rax + rbx is : %llx\n", $arg2);
}0: kHyperDbg> .script "C:\path to script\script.ds" 55 @rax+@rbxBOOLEAN
hyperdbg_u_run_script(CHAR * Expr, BOOLEAN ShowErrorMessageIfAny);