Calculate any version

Results 1 to 3 of 3
  1. #1
    Kingdom of Shadows [RCZ]ShadowKing is offline
    MemberRank
    Jul 2007 Join Date
    1,644Posts

    Calculate any version

    Hello,i'll tell you in this thread how to convert client->server or server->client versions for any version(even for the "wrong" version 9.99.99).
    This is the original formula decompiled from main.exe so it will work 100%.

    I will calculate the 9.99.99 client version highlighting the numbers i used from original string:
    Code:
    48+9+1 = 58(3A in hex)
    48+9+2 = 59(3B in hex)
    48+9+3 = 60(3C in hex)
    48+9+4 = 61(3D in hex)
    49+9+5 = 62(3E in hex)
    NOTE: the purple bold,italic,underlined numbers represent the place of version number in the client string(1 for first 9,2 for second 9 and so on up to 5).

    now convert from decimal to hex using scientific calculator provided by windows(58->3A,59->3B and so on) and put all values together and you will get "3A3B3C3D3E".Now get this hex string and use this page to convert it from hex to string and voilla : ":;<=>".

    NOTE: to avoid the conversion from hex to string you simply can replace the bytes from main instead of replacing ascii strings.

    client->server conversion ":;<=>" = "3A3B3C3D3E" (in hex using this page)

    3A represent 58
    3B represent 59
    3C represent 60
    3D represent 61
    3E represent 62
    (hex to decimal with windows calculator)
    Code:
    58-48-1 = 9
    59-48-2 = 9
    60-48-3 = 9
    61-48-4 = 9
    62-48-5 = 9
    now just put a point starting from right to left after each group of 2 numbers.
    "9.99.99"
    I hope you will find this useful.


  2. #2
    Proficient Member phit666 is offline
    MemberRank
    Apr 2007 Join Date
    197Posts

    Re: Calculate any version

    Automate it...

    PHP Code:
    <?php
    function h2a($str)
    {
        
    $x '';
        for (
    $i=0$i strlen($str); $i=$i+2)
        {
            
    $x .= chr(hexdec(substr($str$i2)));
        }
        return 
    $x;
    }


    $mver '9.99.99'// server version


    $mver_split addcslashes("$mver",'0..9.');
    $n explode("\\"$mver_split);
    $base 30// hex value (48 dec)
    $h dechex(hexdec($base)+hexdec($n[1])+hexdec(1));
    $h .= dechex(hexdec($base)+hexdec($n[3])+hexdec(2));
    $h .= dechex(hexdec($base)+hexdec($n[4])+hexdec(3));
    $h .= dechex(hexdec($base)+hexdec($n[6])+hexdec(4));
    $h .= dechex(hexdec($base)+hexdec($n[7])+hexdec(5));
    $mumv h2a($h);


    echo 
    "Hex: [".$h."] - Ascii: [".$mumv."]";
    ?>

  3. #3
    Member dotsis is offline
    MemberRank
    Oct 2007 Join Date
    50Posts

    Re: Calculate any version

    Quote Originally Posted by phit666 View Post
    Automate it...

    PHP Code:
    <?php
     
    function h2a($str)
    {
        
    $x '';
         for (
    $i=0$i strlen($str); $i=$i+2)
        {
             
    $x .= chr(hexdec(substr($str$i2)));
        }
        return 
    $x;
    }


     
    $mver '9.99.99'// server version


     
    $mver_split addcslashes("$mver",'0..9.');
    $n explode("\\"$mver_split);
    $base 30// hex value (48 dec)
    $h dechex(hexdec($base)+hexdec($n[1])+hexdec(1));
    $h .= dechex(hexdec($base)+hexdec($n[3])+hexdec(2));
    $h .= dechex(hexdec($base)+hexdec($n[4])+hexdec(3));
    $h .= dechex(hexdec($base)+hexdec($n[6])+hexdec(4));
    $h .= dechex(hexdec($base)+hexdec($n[7])+hexdec(5));
     
    $mumv h2a($h);


    echo 
    "Hex: [".$h."] - Ascii: [".$mumv."]";
    ?>
    Yow, it's been years! Thanks for this very useful snippet! I have decided to make it more useful for public viewers. Credits all to you. Cheers!

    MuOnline Main Version Converter
    Last edited by dotsis; 22-03-15 at 10:29 AM.



Advertisement