Server Help

Bot Questions - encryption response

Miesco - Mon Aug 23, 2004 11:41 am
Post subject: encryption response
Is my 00 02 response suppost to look like this:

00 02 01 00 00 00 00 96 7a 90 38 1c cf e6 b8 3c cb 7d 90 5f 9f 92 94 70 80 a8 f9 92 8e 00 48 db 71 15 32 ac af e3 8e ae 60 9e b1 0f fb 86 80 e7 74 47 ba 77 75 e0 2c 06 29 16 2d 56 12 52 68 fb 4f 00 c7 47 8d 8e 44 57 6b 76 b9 ae 37 3f f7 f0 20 08 99 e2 d7 0a 80 92 9a c9 c2 94 94 42 9c 35 57 d3 ce 2a 27 69 51 d2 00 3a 63 b5 8f d4 93 fb 6a c9 83 88 cb 76 ff d4 48 4e 31 3c 3b a5 06 11 7c 2a 79 35 49 bd ab af f0 29 41
2dragons - Mon Aug 23, 2004 12:07 pm
Post subject:
no.

should be 5 bytes long, 6 with the leading 0x00


0x02 Encryption Response

Offset Length Description
0 1 Type Byte 0x02
1 4 Server Encryption Key
Miesco - Mon Aug 23, 2004 12:17 pm
Post subject:
Any reason why I get all this stuff AFTER I receive the correct response?
Mine GO BOOM - Mon Aug 23, 2004 12:34 pm
Post subject:
You are connecting to a zone connect to the SSC billing server. All that extra 'junk' is what is used to verify that you are connected to the real SSC billing server, and is used to keep your password secure even from the server and/or proxies.

In other words, just ignore it.
Anonymous - Mon Aug 23, 2004 12:47 pm
Post subject:
I also get stuff after other packets like:

00 04 00 00 00 00 80 17 ec 26

is that also just stuff I should ignore?
Anonymous - Mon Aug 23, 2004 1:35 pm
Post subject:
Mine GO BOOM wrote:
All that extra 'junk' is what is used to verify that you are connected to the real SSC billing server
How come asss test zone doesn't have the extra stuff yet has no password warning when logging in?
D1st0rt - Mon Aug 23, 2004 4:35 pm
Post subject:
There's no warning because its on SSC
Anonymous - Mon Aug 23, 2004 4:42 pm
Post subject:
How do you tell whether it is on SSC or not?
D1st0rt - Mon Aug 23, 2004 4:43 pm
Post subject:
chats
Anonymous - Mon Aug 23, 2004 4:52 pm
Post subject:
How can the client get on a chat channel before it has even logged in?
Mr Ekted - Mon Aug 23, 2004 5:35 pm
Post subject:
Anonymous wrote:
I also get stuff after other packets like:

00 04 00 00 00 00 80 17 ec 26

is that also just stuff I should ignore?


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():

Code: Show/Hide
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! icon_razz.gif
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
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group