8000 Intro update · DosX-dev/obfus.h@b567224 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Intro update
Browse files Browse the repository at this point in the history
  • Loading branch information
DosX-dev committed Feb 10, 2025
1 parent f9720a2 commit b567224
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions include/obfus.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝
Very reliable armor for your C programs!
Coded by (C) DosX, 2024
Coded by (C) DosX, 2025
[Additional options]
~ CFLOW_V2 = more powerful Control Flow obfuscation (slowly!)
Expand All @@ -25,6 +25,8 @@
GitHub:
-> https://github.com/DosX-dev/obfus.h
(Full documentation and examples are available on the GitHub page)
*/

#ifndef OBFH
Expand All @@ -37,7 +39,7 @@
// if virtualization disabled
#if NO_OBF == 1 || VIRT != 1
#define HIDE_STRING(str) str
#define ANTI_DEBUG 0

#define VM_ADD(num1, num2) num1 + num2
#define VM_SUB(num1, num2) num1 - num2
#define VM_MUL(num1, num2) num1 *num2
Expand Down Expand Up @@ -968,9 +970,9 @@ int IsDebuggerPresent_proxy() OBFH_SECTION_ATTRIBUTE {

/*
void antiDebugMessage() {
typedef int(WINAPI * MessageBoxAType)(HWND, LPCSTR, LPCSTR, UINT);
MessageBoxAType MessageBoxA = (MessageBoxAType)GetProcAddress(LoadLibraryA("user32.dll"), "MessageBoxA");
if (MessageBoxA != NULL) MessageBoxA(NULL, "Debugging prevented.", "", 0x10);
typedef int(WINAPI * MessageBoxAType)(HWND, LPCSTR, LPCSTR, UINT);
MessageBoxAType MessageBoxA = (MessageBoxAType)GetProcAddress(LoadLibraryA("user32.dll"), "MessageBoxA");
if (MessageBoxA != NULL) MessageBoxA(NULL, "Debugging prevented.", "", 0x10);
}
*/

Expand Down Expand Up @@ -1306,11 +1308,11 @@ int snprintf_proxy(char *str, size_t size, const char *format, ...) OBFH_SECTION

/*
#define printf(...) (([](...) -> int { \
static void (*printf_proxy)(const char *, ...) = NULL; \
if (printf_proxy == NULL) { \
printf_proxy = (void (*)(const char *, ...))GetProcAddress(GetModuleHandleA("msvcrt.dll"), "printf"); \
} \
return printf_proxy(__VA_ARGS__); \
static void (*printf_proxy)(const char *, ...) = NULL; \
if (printf_proxy == NULL) { \
printf_proxy = (void (*)(const char *, ...))GetProcAddress(GetModuleHandleA("msvcrt.dll"), "printf"); \
} \
return printf_proxy(__VA_ARGS__); \
})(__VA_ARGS__))
*/

Expand Down

0 comments on commit b567224

Please sign in to comment.
0