From c7f119e0a2e2802cd96e16cb18a4f9d92e649eb7 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 3 Aug 2018 02:32:05 -0400 Subject: [PATCH] add /h code explanation --- GUI/mainwindow.cpp | 5 +---- GUI/misc.h | 9 +++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index a2c6b38..e2111e2 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -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) diff --git a/GUI/misc.h b/GUI/misc.h index bde6202..56e9acc 100644 --- a/GUI/misc.h +++ b/GUI/misc.h @@ -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