Shared object obfuscation concept proven.
This commit is contained in:
40
linux/shared_object_obfuscation/shared_object.cpp
Normal file
40
linux/shared_object_obfuscation/shared_object.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
VIM: let g:lcppflags="-O2 -pthread"
|
||||
VIM: let g:argv=""
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
|
||||
#include "interface.h"
|
||||
|
||||
MyVerySecretClass::MyVerySecretClass()
|
||||
: secret_var(0)
|
||||
{
|
||||
}
|
||||
|
||||
MyVerySecretClass::~MyVerySecretClass()
|
||||
{
|
||||
secret_var = -1;
|
||||
}
|
||||
|
||||
void MyVerySecretClass::secret_method1()
|
||||
{
|
||||
++secret_var;
|
||||
}
|
||||
|
||||
void MyVerySecretClass::secret_method2()
|
||||
{
|
||||
std::cout << "The value of secret variable is " << secret_var << std::endl;
|
||||
}
|
||||
|
||||
void MyVerySecretClass::secret_method3()
|
||||
{
|
||||
char cmdln[128];
|
||||
sprintf( cmdln, "pstack %d", getpid() );
|
||||
system( cmdln );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user