Ack packets should be exactly 6 bytes long. There should never be anything after them unless they are encapsulated in a cluster packet. If you see a packet starting with 00 04 that is longer than 6 bytes, you are doing something wrong.
Miesco - Tue Aug 24, 2004 5:37 am
Post subject:
Mr. Ekted, yea im pretty sure its my encryption, here is my decrypt():
sub ssdecrypt {
my @packet = @_;
my ($tempKey, $tempInt, $count, @output, $index);
if (@packet[0] == 0x00) {
$index = 2;
} else {
$index = 1;
}
$tempKey = $serverKey;
#$count = int( scalar(@packet) + (4 - scalar(@packet) % 4) );
$count = scalar(@packet);
#$count = scalar(@packet[$index .. $#packet]);
@output = @packet[$index .. $#packet];
for ($i = 0; $i < $count; $i += 4) {
$tempInt = dece_int(@table[$i .. $i+3]) ^ $tempKey ^ dece_int(@output[$i .. ($i+3)]);
$tempKey = dece_int(@output[$i .. ($i+3)]);
@output[$i .. ($i+3)] = ence_int(int($tempInt & 0xffffffff));
}
unshift(@output, @packet[0 .. $index-1]);
return @output;
} |
See how there are 2 commented $count's, well it depends on which one I have to how many extra packets add on, if I make it the last one (.................... NEVER MIND I just found out how to do it while posting! I got it write now, no extra stuff
Mr Ekted - Tue Aug 24, 2004 6:10 am
Post subject:
What language is that?
Cyan~Fire - Tue Aug 24, 2004 6:20 am
Post subject:
It looks messed up enough to be PERL. Maybe that's why your encryption doesn't work... you're mixing languages!
Miesco - Tue Aug 24, 2004 6:21 am
Post subject:
Its only perl, so is the rest of my core, who said I was doing it in C
Anonymous - Tue Aug 24, 2004 7:37 am
Post subject:
Is this SSJTrunksz?
Miesco - Tue Aug 24, 2004 8:09 am
Post subject:
of course
Cyan~Fire - Tue Aug 24, 2004 5:09 pm
Post subject:
Oh darnit I got confused between your post and emileej's. My bad, sorry.
Miesco - Tue Aug 24, 2004 10:06 pm
Post subject:
Yea well were both making a bot core, both have questions about the same things.
D1st0rt - Wed Aug 25, 2004 9:46 am
Post subject:
@Smong: I was just saying thats how I know its on ssc, I have no idea how the client knows, but mgb says its in the extra