Showing iPatientZero's PolyEngine algorithm

03/31/2016 13:42 Cyrex'#1
PHP Code:
#include <Windows.h>
#include <iostream>
#include <time.h>
#include <vector>
#include <map>
#include <string>

#define MAX_VALUE_FOR_RANDOM 9734983
#define MAX_VALUE_FOR_TYPES 5
#define MAX_VALUE_FOR_VARNAME 15

enum Types
{
    
fl 0,
    
integer 1,
    
character 2,
    
const_character 3,
    
booleaN 4,
};

std::string TypeToStringsize_t typeValue )
{
    if ( 
typeValue == Types::fl )
        return 
"float ";
    if ( 
typeValue == Types::integer )
        return 
"int ";
    if ( 
typeValue == Types::character )
        return 
"char ";
    if ( 
typeValue == Types::const_character )
        return 
"const char* ";
    if ( 
typeValue == Types::booleaN )
        return 
"bool ";
}

void gen_randomchar *s, const int len ) {
    static const 
char alphanum[] =
        
"0123456789"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        "abcdefghijklmnopqrstuvwxyz"
;

    for ( 
int i 0len; ++) {
        
s[i] = alphanum[rand( ) % ( sizeofalphanum ) - )];
    }

    
s[len] = 0;
}

int main( )
{
    
srandtimeNULL ) );

    
size_t randomType;
    
unsigned randomValue;


    
charrandomVarNamePrefix "_var_";
    
charrandomVarNameSuffix = ( char* )mallocMAX_VALUE_FOR_VARNAME );
    
charfinalVarName = ( char* )mallocMAX_VALUE_FOR_VARNAME );


    
charrandomCharValue = ( char* )mallocMAX_VALUE_FOR_VARNAME );
    
size_t randomVarNameSize;
    
charrandomChar = ( char* )malloc);
    for ( 
auto i); 10; ++)
    {
        
randomVarNameSize rand( ) % MAX_VALUE_FOR_VARNAME 5;
        
gen_randomrandomVarNameSuffixrandomVarNameSize );
        
strcpyfinalVarNamerandomVarNamePrefix );
        
strcatfinalVarNamerandomVarNameSuffix );
        
        
randomType rand( ) % MAX_VALUE_FOR_TYPES// 0 to 4
        
randomValue rand( ) % MAX_VALUE_FOR_RANDOM// 0 to 9734982

        
if ( randomValue == )
        {
            
std::cout << TypeToStringrandomType ) << finalVarName << ";\n";
            continue;
        }

        if ( 
randomType == Types::character )
        {
            
gen_randomrandomChar);
            
std::cout << TypeToStringrandomType ) << finalVarName << " = '" << randomChar << "';\n";
            continue;
        }
        else if ( 
randomType == Types::const_character )
        {
            
gen_randomrandomCharValueMAX_VALUE_FOR_VARNAME );
            
std::cout << TypeToStringrandomType ) << finalVarName << " = \"" << randomCharValue << "\";\n";
            continue;
        }

        
std::cout << TypeToStringrandomType ) << finalVarName << " = " << randomValue << ";\n";
    }

    
std::cin.get( );

possible output:

Code:
bool _var_tj1hr7hd = 20686;
bool _var_gV2pkbHp8wlou = 21773;
char _var_D2KfqxT9 = 'U';
bool _var_qmWAFw = 22076;
const char* _var_4bkttBMw1mJl8j = "qdheM1MZuFv1TpO";
bool _var_U4iQahPq = 8714;
float _var_ynSUGegSN = 18218;
char _var_L75H34Ed2MN = 'X';
int _var_W4clpxnOR5jXhq7th = 24626;
const char* _var_31kbmJwGRbMHPX = "ISQEoloh6ZmJzhi";
his polyengine 'should' protect you from signatures ROFL.
if you wanna use this(XD) you have to wrap the junk code around your 'real'
source code stuff whatever lol lmao.

just wrap this whole thing in a function and then do something like
"[JUNK PLEASE HERE]" string before your codenz .cpp / .txt / .hpp / .h file and
"[JUNK PLEASE END HERE]" string after your codenz you want to HIDE.

Search for that with std algorithms get the offset in file lines or stuff
and then place it there with the wrapper function.

here: search that shit set stream pos with [Only registered and activated users can see links. Click Here To Register...]
fseek and then write the crap out of it.

PS: don't forget to free the allocated memory