Decrypt packets - Seafight

03/10/2012 15:44 stronka111#1
Seafight is a flash game. I would make a program which would show the normally hidden things for the player (hidden players, the amount of hp of enemies).I decided to start I need decrypt the packets sent by the server. I open the WPE pro and is a sample packet:
Code:
55 25 39 40 3B 39 3D 3A 3B 40 41 25 3B 3F 3D 34 3B 3C 2B 3B 3F 3D 34 3B 3B 2B 3B 3F 3E 34 3B 3B 2B 3B 3F 3E 34 3B 3A 2B 3B 3F 3F 34 3B 3A 2B 3B 3F 3F 34 3B 39 2B 3B 3F 40 34 3B 39 2B 3B 3F 40 34 3B 38 2B 3B 3F 41 34 3B 38 2B 3B 3F 41 34 3A 41 2B 3B 40 38 34 3A 41 2B 3B 40 38 34 3A 40 00
Asci:
U%9@;9=:;@A%;?=4;<+;?=4;;+;?>4;;+;?>4;:+;??4;:+;??4;9+;?@4;9+;?@4;8+;?A4;8+;?A4:A+;@84:A+;@84:@.
Rather, I will read nothing ,I have no idea how to decrypt this..
So I'm writing on this forum, I hope someone has some experience in decrypt packets?
Please help me :)
03/10/2012 16:22 ms​#2
The 0x25-Bytes seperate the data. The 0-Byte marks the end of a packet. So in your example it would be:

Code:
55

39 40 3B 39 3D 3A 3B 40 41

3B 3F 3D 34 3B 3C 2B 3B 3F 3D 34 3B 3B 2B 3B 3F 3E 34 3B 3B 2B 3B 3F 3E 34 3B 3A 2B 3B 3F 3F 34 3B 3A 2B 3B 3F 3F 34 3B 39 2B 3B 3F 40 34 3B 39 2B 3B 3F 40 34 3B 38 2B 3B 3F 41 34 3B 38 2B 3B 3F 41 34 3A 41 2B 3B 40 38 34 3A 41 2B 3B 40 38 34 3A 40
The very first byte is the opcode of the packet.

Then you have to subtract 8 from each byte beside the opcode. Now you have the packet in plaintext.
03/10/2012 16:22 .Infinite#3
Why should the server send packets to you containing the hp of enemies when the client doesn't even need this information?
I guess the client just tells the server how much damage you did and server server answers if the enemy is already defeated.

This would mean, what you want to do is not possible...
03/10/2012 17:33 SmackJew#4
Quote:
Originally Posted by Metin2Spieler97 View Post
The 0-Byte marks the end of a packet.
Duh. :)
03/10/2012 17:44 MoepMeep#5
Quote:
Originally Posted by .Infinite View Post
the client just tells the server how much damage you did
For sure ;o

It's more like this

SEND attack
RECV damageDone
03/10/2012 19:17 stronka111#6
So I must subtract: byte - 0x08, byte - 0x08, byte - 0x08... and I will have decrypt bytes?
Thanks:)
03/10/2012 19:36 ms​#7
Quote:
Originally Posted by stronka111 View Post
So I must subtract: byte - 0x08, byte - 0x08, byte - 0x08... and I will have decrypt bytes?
Thanks:)
yes

I don't know what happens if the byte's value is below 8, but I guess it rolls over to 255. This probably won't happen anyway since Seafight encodes all values in ASCII.
03/12/2012 14:24 stronka111#8
Quote:
Originally Posted by .Infinite View Post
Why should the server send packets to you containing the hp of enemies when the client doesn't even need this information?
I guess the client just tells the server how much damage you did and server server answers if the enemy is already defeated.

This would mean, what you want to do is not possible...
I don't know why but server tells:
EM881934315-254Serena792792
792 is a HP this monster;p