add /h code explanation

This commit is contained in:
Akash Mozumdar 2018-08-03 02:32:05 -04:00
parent 6835c339d7
commit c7f119e0a2
2 changed files with 10 additions and 4 deletions

View File

@ -179,10 +179,7 @@ void MainWindow::on_detachButton_clicked()
void MainWindow::on_hookButton_clicked()
{
bool ok;
QString hookCode = QInputDialog::getText(this, "Add Hook",
"Enter hook code\r\n/H{A|B|W|S|Q|V}[N]data_offset[*drdo][:sub_offset[*drso]]@addr[:module]",
QLineEdit::Normal, "/H", &ok
);
QString hookCode = QInputDialog::getText(this, "Add Hook", HCodeInfoDump, QLineEdit::Normal, "/H", &ok);
if (!ok) return;
HookParam toInsert = ParseHCode(hookCode);
if (toInsert.type == 0 && toInsert.length_offset == 0)

View File

@ -11,4 +11,13 @@ QStringList GetAllProcesses();
HookParam ParseHCode(QString HCode);
QString GenerateHCode(HookParam hp, DWORD processId);
static QString HCodeInfoDump =
"Enter hook code\r\n /H{A|B|W|S|Q|V}[N]data_offset[*deref_offset1][:split_offset[*deref_offset2]]@addr[:module]\r\n\
All numbers in hexadecimal\r\n\
A/B: Shift-JIS char little/big endian\r\n\
W: UTF-16 char\r\n\
S/Q/V: Shift-JIS/UTF-16/UTF-8 string\r\n\
Negatives for data_offset/sub_offset refer to registers\r\n\
-4 for EAX, -8 for ECX, -C for EDX, -10 for EBX, -14 for ESP, -18 for EBP, -1C for ESI, -20 for EDI\r\n\
* means dereference pointer+deref_offset";
#endif // MISC_H