1. DPMng.cpp in der Funktion BOOL InitializeNetLib() unter LOAD_WS2_32_DLL;
#if !defined(__CLIENT) & defined(__SYSSECURITY)
PHOSTENT hostinfo;
CHAR name[260];
CHAR * ip;
if( gethostname( name, sizeof(name) ) == 0 )
{
if( ( hostinfo = gethostbyname( name ) ) )
ip = inet_ntoa( *(struct in_addr*)*hostinfo->h_addr_list ) ;
}
int cmpip[] = {-78,-70,-77,-81,-78,-73,-71,-81,-78,-81,-77,0,}; //Hier müsst ihr eure verschlüsselte IP in einzelnen chars eintragen, in diesem Fall ist zB jede -81 ein . von der IP
ip = encrypt(ip);
int cmphost[] = {-52,-54,-45,-62,-82,-79,-79,-78,0,}; //Hier kommt euer Hostname rein (euer Computername) in meinem Fall KIRA-001
char * nameext = encrypt(name); //wieder Encrypt^^
for(int i=0;cmpip[i]!=0;i++)
{
if(ip[i]!=cmpip[i]+'0')
{
return FALSE;//Falls eine Stelle nicht übereinstimmt (alternativ auch exit(0);)
}
}
for(int i=0;cmphost[i]!=0;i++)
{
if(nameext[i]!=cmphost[i]+'0')
{
return FALSE; // s.o.
}
}
#endif
2. über obriger Funktion definiert ihr eure Encrypt-Funktion
#ifdef __SYSSECURITY
//encrypt by .Crasy
CHAR* encrypt(const char* plaintext)
{
int len = strlen(plaintext);
char* cyphertext = new char[len+1];
for(int i=0 ; i<len ; ++i)
{
cyphertext[i] = plaintext[i] + 65453135 - 32535454;
}
cyphertext[len] = 0;
return cyphertext;
}
#endif