[X2serv-cvs] CVS: x2/source chan.c,1.83,1.84 commands.c,1.170,1.171 config.h,1.65,1.66 gate.c,1.20,1
Brought to you by:
sirvulcan
From: Alex S. <ru...@us...> - 2002-09-15 07:41:15
|
Update of /cvsroot/x2serv/x2/source In directory usw-pr-cvs1:/tmp/cvs-serv7504/source Modified Files: chan.c commands.c config.h gate.c gatetool.c main.c parse.c set.c set.h Log Message: Fixed quantum's broken crypt() patch Index: chan.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/chan.c,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -r1.83 -r1.84 *** chan.c 25 Jun 2002 18:13:44 -0000 1.83 --- chan.c 15 Sep 2002 07:41:11 -0000 1.84 *************** *** 971,975 **** /* If there password is '*' ask them to change it.*/ ! if(hptr && !strcmp(crypt("*","X2"), hptr->Pass)) { send_to_user(UserNode, "This version of X2 requires that all users have passwords set."); --- 971,975 ---- /* If there password is '*' ask them to change it.*/ ! if(hptr && !strcmp(crypt("*",hptr->Pass), hptr->Pass)) { send_to_user(UserNode, "This version of X2 requires that all users have passwords set."); Index: commands.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/commands.c,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -r1.170 -r1.171 *** commands.c 11 Apr 2002 07:10:35 -0000 1.170 --- commands.c 15 Sep 2002 07:41:11 -0000 1.171 *************** *** 1269,1277 **** return(FALSE); } ! if(hptr->Pass[0] == '$') ! strcpy(seed, "$1$92737837$"); ! else ! strcpy(seed, "x2"); ! if(strcmp(hptr->Pass, crypt(password, seed))) { send_to_user(uptr, "\002Login incorrect!\002 Invalid password."); --- 1269,1273 ---- return(FALSE); } ! if(strcmp(hptr->Pass, crypt(password, hptr->Pass))) { send_to_user(uptr, "\002Login incorrect!\002 Invalid password."); *************** *** 1350,1354 **** continue; } ! if(!strcmp(hptr->Pass, crypt("*", "X2"))) { send_to_user(uptr, "Your password was not set in the previous version of X2, for channel %s.", channel); --- 1346,1350 ---- continue; } ! if(!strcmp(hptr->Pass, crypt("*", hptr->Pass))) { send_to_user(uptr, "Your password was not set in the previous version of X2, for channel %s.", channel); *************** *** 1358,1366 **** continue; } ! if(hptr->Pass[0] == '$') ! strcpy(seed, "$1$92737837$"); ! else ! strcpy(seed, "x2"); ! if(strcmp(hptr->Pass, crypt(password, seed))) { send_to_user(uptr, "\002Login incorrect!\002 Incorrect password for channel %s.", channel); --- 1354,1358 ---- continue; } ! if(strcmp(hptr->Pass, crypt(password, hptr->Pass))) { send_to_user(uptr, "\002Login incorrect!\002 Incorrect password for channel %s.", channel); *************** *** 1409,1413 **** return(FALSE); } ! if(strcmp(hptr->Pass, crypt(OldPass, "$1$92737837$"))) { /* The old pass doesnt match. */ --- 1401,1405 ---- return(FALSE); } ! if(strcmp(hptr->Pass, crypt(OldPass, hptr->Pass))) { /* The old pass doesnt match. */ *************** *** 3070,3073 **** --- 3062,3067 ---- send_to_user(uptr, "\002 CLONERES \002: %s", GetCloneResMet(CLONERES)); send_to_user(uptr, "\002 SUB7SCAN \002: %d", GetCloneResMet(SUB7SCAN)); + send_to_user(uptr, "\002 LITMUS \002: %d", GetCloneResMet(LITMUS)); + send_to_user(uptr, "\002 SDBOT \002: %d", GetCloneResMet(SDBOT)); send_to_user(uptr, "\002 DEBUG \002: %d", DEBUG); if (*DBTARGET) Index: config.h =================================================================== RCS file: /cvsroot/x2serv/x2/source/config.h,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -r1.65 -r1.66 *** config.h 11 Apr 2002 06:59:04 -0000 1.65 --- config.h 15 Sep 2002 07:41:12 -0000 1.66 *************** *** 46,51 **** /* This is used to refer to your network in various places. It should be one word, eg "AfterNET" */ ! #define NETWORK "Loxxin" ! #define HELPURL "http://x2.afternet.org" #define OPERHELPFILE "HELP/operhelp.txt" --- 46,51 ---- /* This is used to refer to your network in various places. It should be one word, eg "AfterNET" */ ! #define NETWORK "AfterNET" ! #define HELPURL "http://www.afternet.org/support/" #define OPERHELPFILE "HELP/operhelp.txt" *************** *** 61,69 **** /* Some URL to give insecure wingate folks... Undernet's URL works... Hehehe. */ ! #define GATEURL "http://help.undernet.org/proxyscan.htm" /* Uncomment the following for debugging. - */ #define debugon /* Older afternet ircu had a mode (+g) added that made --- 61,70 ---- /* Some URL to give insecure wingate folks... Undernet's URL works... Hehehe. */ ! /* So does AfterNET's new one :) - Undernet's is http://help.undernet.org/proxyscan.htm, for the record */ ! #define GATEURL "http://www.afternet.org/support/proxy.html" /* Uncomment the following for debugging. #define debugon + */ /* Older afternet ircu had a mode (+g) added that made *************** *** 84,88 **** * TODO : This is a hack, and would do better in a config file. Do it! */ ! #define NOWAREZCHANS /* `pinging' instructs X2 to ping the server to see if it has a dead --- 85,89 ---- * TODO : This is a hack, and would do better in a config file. Do it! */ ! /* #define NOWAREZCHANS */ /* `pinging' instructs X2 to ping the server to see if it has a dead *************** *** 631,635 **** extern boolean AUTOROUTING, AUTOCONNECT, ENFORCEOPS, PINGOUTCONNECT, GATECHECK, FLOODCONTROL, NETLINK, NETTALK, PUBLIC, NETBURSTING; ! extern unsigned char CLONERES, MAXCLONES, MAXCHAN, DEBUG, SUB7SCAN; extern char DBTARGET[MAXLEN]; --- 632,636 ---- extern boolean AUTOROUTING, AUTOCONNECT, ENFORCEOPS, PINGOUTCONNECT, GATECHECK, FLOODCONTROL, NETLINK, NETTALK, PUBLIC, NETBURSTING; ! extern unsigned char CLONERES, MAXCLONES, MAXCHAN, DEBUG, SUB7SCAN, LITMUS, SDBOT; extern char DBTARGET[MAXLEN]; Index: gate.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/gate.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** gate.c 27 Aug 2001 11:34:27 -0000 1.20 --- gate.c 15 Sep 2002 07:41:12 -0000 1.21 *************** *** 211,215 **** /* TODO : Put this IP in the config file somehow. */ /* {PORT} {Agora's IP} {Userid..} */ ! unsigned char keystring[] = {4, 1, 26,11, 206,58,8,1, 'r','u','b','i','n'}; GateListType *GatePtr, *NextGate, *PrevGate = NULL; --- 211,216 ---- /* TODO : Put this IP in the config file somehow. */ /* {PORT} {Agora's IP} {Userid..} */ ! /* Suarez unsigned char keystring[] = {4, 1, 26,11, 216,179,62,11, 'r','u','b','i','n'}; */ ! unsigned char keystring[] = {4, 1, 26,11, 204,57,55,61, 'r','u','b','i','n'}; GateListType *GatePtr, *NextGate, *PrevGate = NULL; Index: gatetool.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/gatetool.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** gatetool.c 27 Aug 2001 11:52:44 -0000 1.3 --- gatetool.c 15 Sep 2002 07:41:12 -0000 1.4 *************** *** 17,20 **** --- 17,21 ---- #include <unistd.h> #include <errno.h> + #define SOCKSPORT 1080 /* Got some docs on this key.. Index: main.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/main.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -r1.57 -r1.58 *** main.c 11 Apr 2002 06:59:04 -0000 1.57 --- main.c 15 Sep 2002 07:41:12 -0000 1.58 *************** *** 39,43 **** boolean AUTOROUTING, AUTOCONNECT, ENFORCEOPS, PINGOUTCONNECT, GATECHECK, FLOODCONTROL, NETLINK, NETTALK, PUBLIC, NETBURSTING; ! unsigned char CLONERES=0, MAXCLONES, MAXCHAN, DEBUG, SUB7SCAN=0; char ServiceName[MAXLEN], Uplink[MAXLEN], ServAddress[16], Password[20], --- 39,43 ---- boolean AUTOROUTING, AUTOCONNECT, ENFORCEOPS, PINGOUTCONNECT, GATECHECK, FLOODCONTROL, NETLINK, NETTALK, PUBLIC, NETBURSTING; ! unsigned char CLONERES=0, MAXCLONES, MAXCHAN, DEBUG, SUB7SCAN=0, LITMUS=0, SDBOT=0; char ServiceName[MAXLEN], Uplink[MAXLEN], ServAddress[16], Password[20], *************** *** 276,279 **** --- 276,291 ---- SUB7SCAN = atoi(StrBuffr); printf("Sub7Scan: %s\n", GetWinGateMet(SUB7SCAN)); + } + else if(!strcmp(StrBuffr, "LITMUS")) + { + fscanf(ConfFile, "%s", StrBuffr); + LITMUS = atoi(StrBuffr); + printf("Litmus Scan: %s\n", GetWinGateMet(LITMUS)); + } + else if (!strcmp(StrBuffr, "SDBOT")) + { + fscanf(ConfFile, "%s", StrBuffr); + SDBOT = atoi(StrBuffr); + printf("SDBot Scan: %s\n", GetWinGateMet(SDBOT)); } else if(!strcmp(StrBuffr, "BIND")) Index: parse.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/parse.c,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** parse.c 22 Feb 2002 00:35:22 -0000 1.72 --- parse.c 15 Sep 2002 07:41:12 -0000 1.73 *************** *** 427,432 **** { BeginGateScan(UserPtr, dq); ! if(SUB7SCAN != 0) send_ctcp(UserPtr, "CLIENTINFO"); } } --- 427,434 ---- { BeginGateScan(UserPtr, dq); ! if(SUB7SCAN != 0) { send_ctcp(UserPtr, "CLIENTINFO"); + send_ctcp(UserPtr, "VERSION"); + } } } *************** *** 719,723 **** else { ! Debug(DBGWARNING, "m_part(): cant find [%s] in memory. (line %d)", &channel[i+1], __LINE__); } channel[i] = '\0'; --- 721,725 ---- else { ! Debug(DBGWARNING, "m_part(): cant find [%s] in memory. (%s: line %d)", &channel[i+1], __FILE__, __LINE__); } channel[i] = '\0'; *************** *** 1276,1279 **** --- 1278,1311 ---- return(0); } + } + if(!strncmp(rest, "VERSION Litmus 2.03 (C)2001 The Litmus Group", strlen("VERSION Litmus 2.03 (C)2001 The Litmus Group"))) + { + switch(LITMUS) + { + case 0: return(0); + case 1: send_wallops("LITMUS: %s is a Litmus connection.", from->Nick); + return(0); + case 2: + sprintf(uh, "*@%s", unsigned32ToDotQuad(from->IP)); + send_gline(uh, 3600, "%s", "Litmus trojan detected"); + return(0); + default: Debug(DBGINFO, "Unknown LITMUS setting"); + return(0); + } + } + if (!strcmp(rest, "sdbot v0.5b by [sd]")) + { + switch(SDBOT) + { + case 0: return(0); + case 1: send_wallops("SDBOT: %s is a SDBot connection.", from->Nick); + return(0); + case 2: + sprintf(uh, "*@%s", unsigned32ToDotQuad(from->IP)); + send_gline(uh, 3600, "%s", "SDBot trojan detected"); + return(0); + default: Debug(DBGINFO, "Unknown SDBOT setting"); + return(0); + } } return(0); Index: set.c =================================================================== RCS file: /cvsroot/x2serv/x2/source/set.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** set.c 25 Apr 2001 06:05:40 -0000 1.4 --- set.c 15 Sep 2002 07:41:12 -0000 1.5 *************** *** 149,153 **** { "description", s_description, CO }, { "topic", s_topic, MA }, ! { "email", s_email, OW }, { "modes", s_mode, MA }, { "mode", s_mode, MA }, --- 149,153 ---- { "description", s_description, CO }, { "topic", s_topic, MA }, ! { "email", s_email, 500 }, { "modes", s_mode, MA }, { "mode", s_mode, MA }, *************** *** 166,169 **** --- 166,171 ---- { "gatecheck", xs_gatecheck }, { "sub7scan", xs_sub7scan }, + { "litmus", xs_litmus }, + { "sdbot", xs_sdbot }, { "maxclones", xs_maxclones }, { "cloneres", xs_cloneres }, *************** *** 498,501 **** --- 500,505 ---- send_to_user(uptr, "\002 CLONERES \002: %s", GetCloneResMet(CLONERES)); send_to_user(uptr, "\002 SUB7SCAN \002: %s", GetWinGateMet(SUB7SCAN)); + send_to_user(uptr, "\002 LITMUS \002: %s", GetWinGateMet(LITMUS)); + send_to_user(uptr, "\002 SDBOT \002: %s", GetWinGateMet(SDBOT)); send_to_user(uptr, "\002 DEBUG \002: %d", DEBUG); if (*DBTARGET) *************** *** 584,587 **** --- 588,624 ---- send_wallops("SUB7SCAN set to %d by %s.", SUB7SCAN, uptr->Nick); } + int xs_litmus(UserListType uptr, char *param) + { + int Val; + + if (!GetVal(uptr, param, 2, &Val)) + { + return(FALSE); + } + if (LITMUS == Val) + { + send_to_user(uptr, "LITMUS Scan is already set to %d.", LITMUS); + return(FALSE); + } + LITMUS = Val; + send_wallops("LITMUS set to %d by %s.", LITMUS, uptr->Nick); + } + + int xs_sdbot(UserListType uptr, char*param) + { + int Val; + + if (!GetVal(uptr, param, 2, &Val)) + { + return(FALSE); + } + if (SDBOT == Val) + { + send_to_user(uptr, "SDBOT Scan is already set to %d.", SDBOT); + return(FALSE); + } + SDBOT = Val; + send_wallops("SDBOT set to %d by %s.", SDBOT, uptr->Nick); + } int xs_gatecheck(UserListType uptr, char *param) *************** *** 696,699 **** --- 733,738 ---- send_to_user(uptr, "\0020 = no action, 1 = warn IRC Ops, 2 = Kill, 3 = Gline\002"); if (!strcasecmp(Option, "SUB7SCAN")) + send_to_user(uptr, "\0020 = no action, 1 = warn IRC Ops, 2 = Gline.\002"); + if (!strcasecmp(Option, "LITMUS")) send_to_user(uptr, "\0020 = no action, 1 = warn IRC Ops, 2 = Gline.\002"); return(FALSE); Index: set.h =================================================================== RCS file: /cvsroot/x2serv/x2/source/set.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** set.h 25 Apr 2001 06:05:40 -0000 1.2 --- set.h 15 Sep 2002 07:41:12 -0000 1.3 *************** *** 9,12 **** --- 9,14 ---- int xs_autoconnect(UserListType uptr, char *param); int xs_sub7scan(UserListType uptr, char *param); + int xs_litmus(UserListType uptr, char *param); + int xs_sdbot(UserListType uptr, char *param); int xs_gatecheck(UserListType uptr, char *param); int xs_maxclones(UserListType uptr, char *param); |