-- Fixed a claok bug caused by stskeeps(tm) "not knowing how to use << and >> coding"

+- Fixed a cloak bug caused by stskeeps(tm) "not knowing how to use << and >> coding"
+- Fixed some cloak bugs, and applied +x crypto to hostnames as well
This commit is contained in:
stskeeps 2001-04-18 17:36:59 +00:00
parent f5bf9b603e
commit cae1a304ba
2 changed files with 8 additions and 4 deletions

View file

@ -430,4 +430,5 @@
- Removed doc/ADD-TO-IRCRC, doc/INSTALL, doc/Manual, doc/Operators,
doc/irc.1, doc/ircd.8, doc/server-compile-guide
- Made it so Invitewalk and Keywalk don't show for U:lines
- Fixed a claok bug caused by stskeeps(tm) "not knowing how to use << and >> coding"
- Fixed a cloak bug caused by stskeeps(tm) "not knowing how to use << and >> coding"
- Fixed some cloak bugs, and applied +x crypto to hostnames as well

View file

@ -200,7 +200,7 @@ char *hidehost(char *host)
l[4] = crc32(host, strlen(host));
l[2] = ((l[4] + KEY2) ^ KEY)^ KEY3;
l[2] <<= 2; l[2] >>= 2;
l[0] >>= 1; l[0] >>= 1;
l[0] <<= 1; l[0] >>= 1;
ircsprintf(cloaked, "%X.%X.%X.IP", l[2], l[1], l[0]);
return cloaked;
}
@ -223,12 +223,15 @@ char *hidehost(char *host)
break;
}
}
l[0] = ((crc32(host, strlen(host)) + KEY2) ^ KEY)^ KEY3;
l[0] <<= 2;
l[0] >>= 2;
p++;
if (*p)
sprintf(cloaked, "%s-%X.%s", hidden_host,
crc32(host, strlen(host)), p);
l[0], p);
else
sprintf(cloaked, "%s-%X", hidden_host, crc32(host, strlen(host)));
sprintf(cloaked, "%s-%X", hidden_host, l[0]);
return cloaked;
}