Skip to content

Commit 566398b

Browse files
committed
Minor changes
1 parent 40b8d72 commit 566398b

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

HiJack/HiJack.cpp

+26-9
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ using tstring = std::basic_string<TCHAR, std::char_traits<TCHAR>, std::allocator
3131

3232
// General definitions
3333

34-
#define HIJACK_VERSION "1.1.0"
34+
#define HIJACK_VERSION "1.1.1"
3535

3636
#define ProcessDebugFlags static_cast<PROCESSINFOCLASS>(0x1F)
3737
#define SafeCloseHandle(x) if ((x) && (x != INVALID_HANDLE_VALUE)) { CloseHandle(x); }
@@ -1003,16 +1003,9 @@ bool DebugProcess(DWORD unTimeout, bool* pbContinue, bool* pbStopped) {
10031003
}
10041004

10051005
void ShowHelp() {
1006-
#ifndef _DEBUG
1007-
#ifdef _WIN64
1008-
_tprintf_s(_T("HiJack [Version " HIJACK_VERSION "]\n\n"));
1009-
#else
1010-
_tprintf_s(_T("HiJack32 [Version " HIJACK_VERSION "]\n\n"));
1011-
#endif
1012-
#endif // !_DEBUG
1013-
10141006
_tprintf_s(_T("Usage variations:\n"));
10151007
_tprintf_s(_T(" <Path> <Arguments>\n"));
1008+
_tprintf_s(_T(" /list\n"));
10161009
_tprintf_s(_T(" /add <File Name>\n"));
10171010
_tprintf_s(_T(" /remove <File Name>\n"));
10181011
}
@@ -1032,6 +1025,14 @@ int _tmain(int argc, PTCHAR argv[], PTCHAR envp[]) {
10321025
}
10331026

10341027
if (_tcscmp(argv[1], _T("/list")) == 0) {
1028+
#ifndef _DEBUG
1029+
#ifdef _WIN64
1030+
_tprintf_s(_T("HiJack [Version " HIJACK_VERSION "]\n\n"));
1031+
#else
1032+
_tprintf_s(_T("HiJack32 [Version " HIJACK_VERSION "]\n\n"));
1033+
#endif
1034+
#endif // !_DEBUG
1035+
10351036
HKEY hKey = nullptr;
10361037
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options"), 0, KEY_READ, &hKey) != ERROR_SUCCESS) {
10371038
_tprintf_s(_T("ERROR: RegOpenKeyEx (Error = 0x%08X)\n"), GetLastError());
@@ -1063,6 +1064,14 @@ int _tmain(int argc, PTCHAR argv[], PTCHAR envp[]) {
10631064
}
10641065

10651066
if (_tcscmp(argv[1], _T("/add")) == 0) {
1067+
#ifndef _DEBUG
1068+
#ifdef _WIN64
1069+
_tprintf_s(_T("HiJack [Version " HIJACK_VERSION "]\n\n"));
1070+
#else
1071+
_tprintf_s(_T("HiJack32 [Version " HIJACK_VERSION "]\n\n"));
1072+
#endif
1073+
#endif // !_DEBUG
1074+
10661075
if (argc < 3) {
10671076
ShowHelp();
10681077
return EXIT_SUCCESS;
@@ -1124,6 +1133,14 @@ int _tmain(int argc, PTCHAR argv[], PTCHAR envp[]) {
11241133
}
11251134

11261135
if (_tcscmp(argv[1], _T("/remove")) == 0) {
1136+
#ifndef _DEBUG
1137+
#ifdef _WIN64
1138+
_tprintf_s(_T("HiJack [Version " HIJACK_VERSION "]\n\n"));
1139+
#else
1140+
_tprintf_s(_T("HiJack32 [Version " HIJACK_VERSION "]\n\n"));
1141+
#endif
1142+
#endif // !_DEBUG
1143+
11271144
if (argc < 3) {
11281145
ShowHelp();
11291146
return EXIT_SUCCESS;

0 commit comments

Comments
 (0)