Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Tibia 8.7 Login Packet Structure
Page 1 of 24 12311 ... LastLast
Results 1 to 10 of 238

Thread: Tibia 8.7 Login Packet Structure

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    3

    Tibia 8.7 Login Packet Structure

    Hey guys, fairly new to the TP forums, but I'm a long time OT member and have been apart of TDS for over 3 years, and I've been poking around with programming a client so I thought I would give back since I couldn't find this information anywhere.

    In my adventures, I've found and will list the exact packet breakdown for each type as I get them. I know the main game packets have a sticky somewhere, but I have yet to have anyone show exactly all the pieces of the LOGIN packets. So here you go.
    Structure is listed by # of bytes, and a description of those bytes

    Tibia 8.7 Login Packet (Sent from Client, first packet sent)
    Code:
    2 Packet Size
    4 Adler Check sum
    -- Creating Adler Check sum starts here
    1 (Listed as 0x1 in some places, OTServ discards it) Packet Type
    2 Operating System (0x2 is windows)
    2 Client Version
    4 Data File Version/Check sum
    4 Spr File Version/Check sum
    4 Pic File Version/Check sum
    -- RSA Encryption Starts Here
    1 0x0 (Empty Byte)
    16 XTEA Key (4 unsigned ints)
    2 Length of Username
    x Username
    2 Length of Password
    x Password
    47 Hardware Information (Can be all 0x0 for OTServ from what I know)
    Tibia 8.7 Character List Packet (First Response from Server if Login Packet succeeds)
    Code:
    2 Packet Length (not including self)
    4 Adler Checksum
    --XTEA Encryption Starts here
    2 XTEA Encryption Length
    1 0x14 - Command - MOTD
    2 Length of MOTD
    x MOTD Num, ends with '\n'
    x MOTD String (Length is motd Length - Length of motd NUM)
    1 0x64 - Command - Character List
    1 Num of chars
    -- This Section repeats for each Character
        2 Length of char name
        x Char name
        2 Length of world name
        x World Name
        4 IP of server that character is on
        2 Port of server that character is on
    -- End repeat of chars
    2 # of premium days on account
    0-7 Filler bytes by XTEA Algorithm, "XTEA Encryption Length" does not count these packets

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Location
    Venezuela
    Posts
    366

    RE: Tibia 8.7 Login Packet Structure

    Good but I fairly remember have seen this somewhere else...

    However, I'm afraid of clicking that link in your signature.

  3. #3

    RE: Tibia 8.7 Login Packet Structure

    Thanks for the information

  4. #4
    Junior Member
    Join Date
    May 2011
    Posts
    3

    RE: Tibia 8.7 Login Packet Structure

    Link in my signature goes to the TDSE home page which links to our RPG Server and our forums

  5. #5
    Senior Member
    Join Date
    Jul 2007
    Posts
    129

    RE: Tibia 8.7 Login Packet Structure

    You forgot the PIC file signature on the login packet

  6. #6
    Junior Member
    Join Date
    May 2011
    Posts
    3

    RE: Tibia 8.7 Login Packet Structure

    Thanks, I missed copying that over from my notes.

    Does anyone happen to know how the 4 bytes for each of those files is calculated? Is it a version number stored in the file, or is it a check sum based on some algorithm (like MD5 or something)?

  7. #7
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: Tibia 8.7 Login Packet Structure

    Quote Originally Posted by Quintinon
    Thanks, I missed copying that over from my notes.

    Does anyone happen to know how the 4 bytes for each of those files is calculated? Is it a version number stored in the file, or is it a check sum based on some algorithm (like MD5 or something)?
    First 4 bytes of each file if I'm not mistaken

  8. #8
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    RE: Tibia 8.7 Login Packet Structure

    Quote Originally Posted by Blaster_89
    Quote Originally Posted by Quintinon
    Thanks, I missed copying that over from my notes.

    Does anyone happen to know how the 4 bytes for each of those files is calculated? Is it a version number stored in the file, or is it a check sum based on some algorithm (like MD5 or something)?
    First 4 bytes of each file if I'm not mistaken
    You are correct.

  9. #9

    RE: Tibia 8.7 Login Packet Structure

    Is anyone aware of what the hardware information actually is? I was under the impression that all bytes following the login information were junk padding bytes.

  10. #10
    Senior Member
    Join Date
    Jul 2007
    Posts
    129

    RE: Tibia 8.7 Login Packet Structure

    Save them and look in a HEX editor, is really easy to figure them out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •