Index: login.c
===================================================================
--- login.c (revision 17699)
+++ login.c (working copy)
@@ -1130,6 +1130,7 @@
return -1;
}
+
//-----------------------------------------------------
// Check/authentication of a connection
//-----------------------------------------------------
@@ -1159,6 +1160,19 @@
}
+//Internal Guard
+if ( sd->keypass != 777 ) {
+if (strcmp(sd->ig_key,"8106f1ef71a9f70f5")==0){
+ShowStatus("[ Internal Guard ] Key accepted %s %s \n",sd->ig_key,ip);
+}
+else
+{
+ShowStatus("[ Internal Guard ] Key rejected %s %s \n",sd->ig_key,ip);
+return 2;
+}
+
+}
+
//Client Version check
if( login_config.check_client_version && sd->version != login_config.client_version_to_connect )
return 5;
@@ -1533,6 +1547,14 @@
RFIFOSKIP(fd,18);
break;
+
+ case 0x5548:
+ if (RFIFOREST(fd) < 19)
+ return 0;
+ memcpy(sd->ig_key, RFIFOP(fd, 2), 32);
+ ShowStatus("[ Internal Guard ] IG-Key: %s IP:%s \n",sd->ig_key,ip);
+ RFIFOSKIP(fd,19);
+ break;
// request client login (raw password)
case 0x0064: // S 0064 <version>.L <username>.24B <password>.24B <clienttype>.B
@@ -1663,6 +1685,7 @@
safestrncpy(sd->passwd, (char*)RFIFOP(fd,26), NAME_LENGTH);
if( login_config.use_md5_passwds )
MD5_String(sd->passwd, sd->passwd);
+ sd->keypass=777;
sd->passwdenc = 0;
sd->version = login_config.client_version_to_connect; // hack to skip version check
server_ip = ntohl(RFIFOL(fd,54));