Fix IPv6 cloaking in compatability mode (was using the wrong xtab confusor)

This commit is contained in:
Daniel De Graaf 2010-04-24 14:20:21 -05:00
parent 4c350a2072
commit 1bfa48143c

View File

@ -247,14 +247,14 @@ class ModuleCloaking : public Module
item += *input; item += *input;
if (item.length() > 7) if (item.length() > 7)
{ {
hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[1]+rounds) % 4], item).substr(0,8)); hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[0]+rounds) % 4], item).substr(0,8));
item.clear(); item.clear();
} }
rounds++; rounds++;
} }
if (!item.empty()) if (!item.empty())
{ {
hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[1]+rounds) % 4], item).substr(0,8)); hashies.push_back(Hash->sumIV(compatkey, xtab[(compatkey[0]+rounds) % 4], item).substr(0,8));
} }
/* Stick them all together */ /* Stick them all together */
return irc::stringjoiner(":", hashies, 0, hashies.size() - 1).GetJoined(); return irc::stringjoiner(":", hashies, 0, hashies.size() - 1).GetJoined();