https://github.com/a2p1k02/obfus
A small program to obfuscate C++ code
https://github.com/a2p1k02/obfus
cpp obfuscation obfuscator rust
Last synced: about 2 months ago
JSON representation
A small program to obfuscate C++ code
- Host: GitHub
- URL: https://github.com/a2p1k02/obfus
- Owner: a2p1k02
- Created: 2025-05-07T07:13:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-21T04:19:42.000Z (about 1 year ago)
- Last Synced: 2025-06-20T14:43:02.169Z (about 1 year ago)
- Topics: cpp, obfuscation, obfuscator, rust
- Language: Rust
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# obfus
This is a small program to obfuscate C++ code
## Example
### Before:
```cpp
#include
#include
std::string test_func() {
std::string test_string = "hello world";
std::cout << test_string << "\n";
}
int main() {
test_func();
return 0;
}
```
### After
```cpp
#ifdef __GNUC__
#define __UNUSED __attribute__((unused))
#else
#define __UNUSED
#endif
template
__UNUSED static inline void ___func_6346() {
volatile T ___var_6346 = (T)0x7832;
___var_6346 += (T)0x7832;
}
#include
#include
std::string G_OfbrDWq() {
std::string iC0i0bx6gKxt = ""\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64";
std::cout << iC0i0bx6gKxt << ""\\x6e";
}
int main() {
G_OfbrDWq();
return 0x0;
}
```