[SOLVED] Piercing Blow - Packets

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    [SOLVED] Piercing Blow - Packets

    [SOLVED] Piercing Blow - Packets
    Trying to figure this out for a while:

    I've downloaded the latest client files from us.fps-pb.com. I've changed the ip address so it points to localhost.
    I've set up a socket server in C# .NET. I'm receiving an connection when I press the login button.

    The data I receive is:

    Code:
    80 02 03 D0 06 08 88 CA E4 E1 00 00 E8 31 17 F1 20 82 6A 80 71 A2 D1 74 55 44 21 69 B3 0C 74 6C 57 EE 0D BC 04 8B A7 7D 6E FF ED F3 F3 B5 F2 11 3F 9B D6 4E D6 95 C6 5D FC 02 BA 07 22 3A 3D 86 D8 DD 7A BB 22 57 61 4A D0 AA 15 98 F7 BC 8F BF 44 AC 42 4F F6 81 2E 1E BA 81 62 80 E4 9B 48 E4 16 63 90 4C ED 83 3C B3 F1 64 82 90 A3 F6 F7 F1 B8 08 5E D7 E9 F8 09 B8 FF DA 62 53 F7 4B 33 2F BD 43 5F 50 94 1B D8 3B 63 93 0A 7E 00 00 04 16 00 12 00 16 04 00 98 9E 9E A0 00 00 02 00 00 00 00 00 00 00 3E 66 6E C2 C6 66 6E C2 6A CA 70 C2 6E 6E CC 6A 6E 64 6C C4 66 62 6C 72 C8 CC C2 70 C4 6A C8 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    (Think I copied too many bytes, forgive me).

    How do I decrypt it?

    I tried using:

    Code:
    public byte[] Decrypt(byte[] data)
    {
            byte lastElement = data[data.Length - 1];
            for (int i = data.Length - 1; i > 0; i--)
            {
                data[i] = (byte)(((data[i - 1] & 0xFF) << (8 - GetShift())) | ((data[i] & 0xFF) >> GetShift()));
            }
            data[0] = (byte)((lastElement << (8 - GetShift())) | ((data[0] & 0xFF) >> GetShift()));
    
            return data;
    }
    Where data is the bytes I just posted WITHOUT the first two bytes (length).

    GetShift() is this weird key stuff which I'm not familar with. If someone could explain it to me, that'd be great:

    Code:
     return ((29891) % 7) + 1;
    The header I read from it is always 512 or an multiple of it.

    I have a few other questions:

    -> Is there some other form of data encryption used?
    -> Is there a way to get the packet structures without packetlogging?
    -> Does somebody have an updated list of packet structures?
    -> Is there encryption applied on packets send by the server?

    My aim is to build an stable server which can be scaled in order to hold lots of players. Build on the latest version of Piercing Blow.

    Anyone who contributes by any means will get a spot on the credits list.

    I'll create an development thread later when I get around the basics. (Proper packet handling, threading & database)
    Last edited by The General; 09-05-15 at 08:16 PM.
    Feel free to add me on Discord: tdid#5193 :)


  2. #2
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    I'll be online at any time really. Got nothing else to do haha.

    [C#] PB Program.cs - Pastebin.com
    [C#] PB Packet.cs - Pastebin.com


    Feel free to add me on Discord: tdid#5193 :)

  3. #3
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    I don't think I handle the packets the correct way.

    If someone could write down how you handle & decrypt a packet in the correct order when you receive that'd be appreciated.

    Code:
    Username: Derp Password: bbbbbbbbbbbbbbbb
    Raw Data: CF 80 02 03 D0 06 08 88 CA E4 E1 00 00 B6 7D 12 31 3A 0A 6B F6 B0 21 8
    2 00 4B 67 21 C8 40 21 98 03 FE DB 7D 65 8F 25 37 47 33 99 98 22 CB E2 A7 27 82
    F5 1F 20 7F 17 C1 38 B2 FB 04 33 16 24 1E C0 8D E1 5E 1B 7E 83 1B E6 C8 6E 1D 43
     F8 3C 6B 81 BD B0 F6 A5 44 53 60 1A 84 5C 8D 23 23 CE 25 B1 F8 A8 99 E3 35 C9 8
    0 1D 45 13 A5 25 DC C6 3A E3 62 5B 8C 22 3F 04 DC C7 A6 90 D3 5F 8F CA F9 C7 21
    5C 0E C3 22 65 96 64 F1 2B AA 20 00 00 04 16 00 12 00 16 04 00 98 9E 9E A0 00 00
     02 00 00 00 00 00 00 00 3E 66 6E C2 C6 66 6E C2 6A CA 70 C2 6E 6E CC 6A 6E 64 6
    C C4 66 62 6C 72 C8 CC C2 70 C4 6A C8 6E
    
    Username: Derp Password: aaaaaaaaaaaaaaaa
    Raw Data: CF 80 02 03 D0 06 08 88 CA E4 E1 00 01 1E 03 BB 31 FF 9D E1 9B 4E 39 4
    5 12 50 0B 1F 08 5A 02 5F 2C B9 D0 7E D8 6F BB EE 8D 60 4B B0 A0 74 FE 46 EE CD
    8F D2 5C 73 F4 3D FC 2C B1 3C 12 4F 91 9D 25 E5 54 C7 D5 21 53 E6 4D FF 78 FD 86
     6E C4 3B DC F8 07 4D 57 04 A4 49 B2 1B 7C AC 46 55 23 83 4C 02 B8 87 BA EF 21 6
    0 26 26 C0 2A 05 ED 67 0B 0F 8A 32 E3 04 EF B4 86 8F D8 05 E5 D6 8D 12 9D 20 D4
    55 42 F9 FE 9F A7 C7 A1 1A DD E6 00 00 04 16 00 12 00 16 04 00 98 9E 9E A0 00 00
     02 00 00 00 00 00 00 00 3E 66 6E C2 C6 66 6E C2 6A CA 70 C2 6E 6E CC 6A 6E 64 6
    C C4 66 62 6C 72 C8 CC C2 70 C4 6A C8 6E
    
    Username: Derp Password: aaaaaaaaaaaaaaaa
    Raw Data: CF 80 02 03 D0 06 08 88 CA E4 E1 00 00 A6 F5 A1 25 32 06 A8 67 81 72 F
    6 B3 98 42 67 15 33 C8 87 F3 9D 3A 18 C3 0C 0A 35 A0 C5 6C C1 3B 8B 52 7E 44 F3
    38 87 0C B5 EB 37 74 89 F3 6F 50 77 E3 BB EE 85 65 62 B8 BA CA 8B E9 23 B9 B4 E4
     B0 1C 07 D2 48 98 C1 00 F4 83 14 BF D4 32 EE BF E4 9D 7B F9 3B 78 38 81 5C 1C 3
    1 6D 67 CB 26 41 F6 0E 38 C3 CE 4F 08 F1 3C D0 3D 4C DF AA 22 B0 C9 FF C6 2B FF
    01 7F 59 A4 A6 63 97 C4 2E A1 8C 00 00 04 16 00 12 00 16 04 00 98 9E 9E A0 00 00
     02 00 00 00 00 00 00 00 3E 66 6E C2 C6 66 6E C2 6A CA 70 C2 6E 6E CC 6A 6E 64 6
    C C4 66 62 6C 72 C8 CC C2 70 C4 6A C8 6E
    The black is what they all have in common. This is what I receive when I press the login button.
    Last edited by The General; 10-05-15 at 04:12 PM.
    Feel free to add me on Discord: tdid#5193 :)

  4. #4
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    Anyone?
    Feel free to add me on Discord: tdid#5193 :)

  5. #5
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    Bump. Still need help regarding the packets. If someone knows how they are encrypted or how to read them, leave it below. Any information regarding the packet and their structures is appreciated
    Feel free to add me on Discord: tdid#5193 :)

  6. #6
    Hardcore Member Nikolen is offline
    MemberRank
    Nov 2013 Join Date
    HellLocation
    141Posts

    Re: Piercing Blow - Packets

    Converting packets to new pb client is just waste of time. We have working server files based on c#. We must work on it. We must fix missing packets, we must code new packets. We don't need changing packets one client to other. It's only waste of time bro


  7. #7
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    You guys are still running on client files from 2012 or older.
    Feel free to add me on Discord: tdid#5193 :)

  8. #8
    Hardcore Member Nikolen is offline
    MemberRank
    Nov 2013 Join Date
    HellLocation
    141Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by The General View Post
    You guys are still running on client files from 2012 or older.
    because this is what we want. people likes these clients. better than new one. and we have working server files for them


  9. #9
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by Nikolen View Post
    because this is what we want. people likes these clients. better than new one. and we have working server files for them
    Only downside is that you cannot get all the packets as it is impossible to reverse engineer. With the current version you're able to still log everything.
    Feel free to add me on Discord: tdid#5193 :)

  10. #10
    Omega Ron is offline
    The OmegaRank
    Apr 2005 Join Date
    Location
    8,993Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by The General View Post
    Yes I know C# pretty well actually. That's why I wanted to start building an server ^.^

    I just need some people that want to help out by packetlogging & figuring out the packet structures.

    I can code a whole server but it is nothing without working packets
    How can you code a whole server without knowing how to work with packets?

  11. #11
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by Ron View Post
    How can you code a whole server without knowing how to work with packets?
    Internals & logic. Packets is only a small fraction. Without packets it is useless.

    Jesus Ron, stop hating for a single time. I know you want your 10k posts.
    Feel free to add me on Discord: tdid#5193 :)

  12. #12
    Omega Ron is offline
    The OmegaRank
    Apr 2005 Join Date
    Location
    8,993Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by The General View Post
    Internals & logic. Packets is only a small fraction. Without packets it is useless.

    Jesus Ron, stop hating for a single time. I know you want your 10k posts.
    It's a pretty valid question. A majority of the work is packet logging and figuring out the packet structures. If you're talking about the entire game, then yes, logic is most of the server. If we're talking about a functional core, 90% of the work is entirely packet handling.

    Your best start is to code an custom packet handling app. Using wire shark is great to get started, but eventually you really need something of your own to log packets. Being able to filter and format packets with your own code makes logging and packet handling significantly easier. That would be my advice to you if you'd like to learn how to do it yourself.

  13. #13
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    I think 80% of the server would be the logic of the game and database handling and what not. Packets are only a small part but you cannot do without them.
    Feel free to add me on Discord: tdid#5193 :)

  14. #14
    Omega Ron is offline
    The OmegaRank
    Apr 2005 Join Date
    Location
    8,993Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by The General View Post
    I think 80% of the server would be the logic of the game and database handling and what not. Packets are only a small part but you cannot do without them.
    Which is why I said 'core'.

    If you're going to put a lot of work in to this, you might as well packet log the latest version and use that as your core. :)

  15. #15
    Death from above! The General is offline
    DeveloperRank
    Aug 2011 Join Date
    9,038Posts

    Re: Piercing Blow - Packets

    Quote Originally Posted by Ron View Post
    Which is why I said 'core'.

    If you're going to put a lot of work in to this, you might as well packet log the latest version and use that as your core. :)
    That was actually why this thread was made.
    Feel free to add me on Discord: tdid#5193 :)



Page 1 of 2 12 LastLast

Advertisement