Results 1 to 7 of 7
  1. #1
    haberon's Avatar
    Join Date
    Jul 2018
    Gender
    male
    Posts
    64
    Reputation
    10
    Thanks
    7

    How to edit rotmg.sol

    I asked a few people for help, but it didn't work so I'm asking here.
    I'm trying to find a way to edit rotmg.sol and change the password and guid with code

    So far I have tried to convert muledump's one click login to C#, but and here's the code.
    Muledump:
    Func _build()
    ;header
    $string = "0x 00 BF" ;Magic Number 2 bytes
    $string &= "?? ?? ?? ??" ;Size 4 bytes
    $string &= "54 43 53 4F 00 04 00 00 00 00" ;Marker 10 bytes
    $string &= "00 05" ;Name Size 2 bytes
    $string &= "52 6F 74 4D 47" ;"RotMG" 5 bytes
    $string &= "00 00 00" ;Padding 3 bytes
    $string &= "03" ;AMF Version 1 byte

    ;data
    $string &= "11" ;Length 1 byte
    $string &= "50 61 73 73 77 6F 72 64" ;"Password" 8 bytes
    $string &= "06" ;Type (string) 1 byte
    $string &= _length($password) ;Length 1 byte
    $string &= $password ;Actual Password ? bytes
    $string &= "00" ;AMF Padding 1 byte

    $string &= "09" ;Length 1 byte
    $string &= "47 55 49 44" ;"GUID" 4 bytes
    $string &= "06" ;Type (string) 1 byte
    $string &= _length($email) ;Length 1 byte
    $string &= $email ;Email ? bytes
    $string &= "00" ;AMF Padding 1 byte

    $string = StringReplace($string," ","")
    $string = StringRegExpReplace($string,"\?{8}",Hex(Int(String Len(StringMid($string,15))/2)))
    EndFunc

    Here is mine:
    String text = "0x 00 BF";
    text += "?? ?? ?? ??";
    text += "54 43 53 4F 00 04 00 00 00 00";
    text += "00 05";
    text += "52 6F 74 4D 47";
    text += "00 00 00";
    text += "03";
    text += "11";
    text += "50 61 73 73 77 6F 72 64";
    text += "06";
    text += password.Length;
    text += password;
    text += "00";
    text += "09";
    text += "47 55 49 44";
    text += "06";
    text += guid.Length;
    text += guid;
    text += "00";
    text = text.Replace(" ", "");
    var regex = new Regex(@"\?{8}");
    text = regex.Replace(text, ((text.Substring(15).Length / 2).ToString("X")));

    If you can fix my code, or provide a better way to do it in C# that would be great

  2. #2
    Austen_Dayton's Avatar
    Join Date
    Mar 2018
    Gender
    female
    Location
    DUBAI
    Posts
    303
    Reputation
    10
    Thanks
    18
    rotmg.sol I believe is the file containing your e-mail & password.

    What are you exactly attempting to do?

  3. #3
    SeXZeFPS's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    In your wardrobe
    Posts
    598
    Reputation
    10
    Thanks
    637
    My Mood
    Asleep
    Quote Originally Posted by Austen_Dayton View Post
    rotmg.sol I believe is the file containing your e-mail & password.

    What are you exactly attempting to do?
    Yes sir!

  4. #4
    haberon's Avatar
    Join Date
    Jul 2018
    Gender
    male
    Posts
    64
    Reputation
    10
    Thanks
    7
    for an mbox to log in to multiple accounts you need to edit rotmg.sol in between each login

  5. #5
    McLovinTon's Avatar
    Join Date
    Nov 2017
    Gender
    female
    Posts
    305
    Reputation
    36
    Thanks
    22
    My Mood
    Breezy
    you should probably go with One Click Login on that? If you don't want to you'll need to put in account the loading times of your Adobe and mess with that. Hope it helps ;0

  6. #6
    CrazyJani's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    2,475
    Reputation
    170
    Thanks
    15,666
    This seemed interesting so I decided to take a stab at it.
     
    Code:
    static readonly byte[] constBytes =
        new byte[] {
            0x00, 0xbf, //magic number
            0x54, 0x43, 0x53, 0x4f, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x52, 0x6f, 0x74, 0x4d, 0x47, 0x00, 0x00, 0x00, 0x03, //file header
            0x09, 0x47, 0x55, 0x49, 0x44, 0x06, //guid header
            0x11, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x06 //password header
        };
    
    static void WriteSol(string guid, string password)
    {
        using (FileStream file = new FileStream("RotMG.sol", FileMode.Create, FileAccess.Write))
        {
            file.Write(constBytes, 0, 2);
    
            byte[] temp = BitConverter.GetBytes(41 + guid.Length + password.Length);
            if (BitConverter.IsLittleEndian)
                Array.Reverse(temp);
            file.Write(temp, 0, temp.Length);
    
            file.Write(constBytes, 2, 27);
    
            temp[0] = (byte)(guid.Length * 2 + 1);
            file.Write(temp, 0, 1);
    
            temp = Encoding.ASCII.GetBytes(guid);
            file.Write(temp, 0, temp.Length);
    
            byte[] pad = new byte[] { 0x00 };
            file.Write(pad, 0, pad.Length);
    
            file.Write(constBytes, 29, 10);
    
            temp[0] = (byte)(password.Length * 2 + 1);
            file.Write(temp, 0, 1);
    
            temp = Encoding.ASCII.GetBytes(password);
            file.Write(temp, 0, temp.Length);
            
            file.Write(pad, 0, pad.Length);
        }
    }
     
    Code:
    #include <string>
    #include <fstream>
    
    const char fileHeader[27] = { 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x54, 0x43, 0x53, 0x4f, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x52, 0x6f, 0x74, 0x4d, 0x47, 0x00, 0x00, 0x00, 0x03 };
    const char guidHeader[6] = { 0x09, 0x47, 0x55, 0x49, 0x44, 0x06 };
    const char passHeader[10] = { 0x11, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x06 };
    
    void writeSol(std::string guid, std::string password)
    {
        int size = 47 + guid.size() + password.size();
        char* buffer = new char[size];
    
        memcpy(buffer, fileHeader, 27);
        int dataLength = size - 6;
        int num = 1;
        if (*(char*)&num == 1) //little endian
        {
            char* ptr = (char*)&dataLength;
            buffer[2] = ptr[3];
            buffer[3] = ptr[2];
            buffer[4] = ptr[1];
            buffer[5] = ptr[0];
        }
        else //big endian
            memcpy(buffer+2, &dataLength, 4);
    
        memcpy(buffer + 27, guidHeader, 6);
        buffer[33] = guid.size() * 2 + 1;
        memcpy(buffer + 34, guid.c_str(), buffer[33] + 1);
    
        memcpy(buffer + 35 + guid.size(), passHeader, 10);
        buffer[45 + guid.size()] = password.size() * 2 + 1;
        memcpy(buffer + 46 + guid.size(), password.c_str(), buffer[45 + guid.size()] + 1);
    
        std::fstream bin("RotMG.sol", std::ios::out | std::ios::binary);
        bin.write(buffer, size);
        bin.close();
    
        delete[] buffer;
    }
    Last edited by CrazyJani; 10-01-2018 at 12:28 AM.

  7. The Following 4 Users Say Thank You to CrazyJani For This Useful Post:

    citydrifter (10-01-2018),headlesspiranha (10-01-2018),Killer Be Killed (10-01-2018),rotmgfaaag (10-01-2018)

  8. #7
    Killer Be Killed's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    212
    Reputation
    53
    Thanks
    2,352
    My Mood
    Asleep
    Here's a solution in Node.js for those that are interested.

    Code:
    /**
     * Creates a sol file with the email and password.
     * @param {string} email The email.
     * @param {string} password The password.
     */
    function createSol(email, password) {
      const sol = [
        '00bf000000005443534f0004000000000005526f744d4700000003094755494406',
        (email.length * 2 + 1).toString(16),
        Buffer.from(email).toString('hex'),
        '001150617373776f726406',
        (password.length * 2 + 1).toString(16),
        Buffer.from(password).toString('hex'),
        '00'
      ].join('');
      const buffer = Buffer.from(sol, 'hex');
      buffer.writeInt32BE(buffer.length - 6, 2);
      return buffer;
    }
    The function returns a Buffer so it can be piped right into a WriteStream like so
    Code:
    const fs = require('fs');
    
    const sol = createSol('test@email.com', 'password');
    
    fs.createWriteStream('RotMG.sol').end(sol);

  9. The Following 2 Users Say Thank You to Killer Be Killed For This Useful Post:

    headlesspiranha (10-01-2018),rotmgfaaag (10-01-2018)

Similar Threads

  1. [Solved] Anyone know how to Packet edit Rotmg
    By LookAtAllThoseChickens in forum Realm of the Mad God Help & Requests
    Replies: 3
    Last Post: 05-15-2016, 06:15 PM
  2. [Help Request] Editing rotmg.sol in Java
    By Phoenix1123 in forum Realm of the Mad God Help & Requests
    Replies: 4
    Last Post: 08-13-2013, 11:47 AM
  3. [Solved] How to edit the rotmg swf?
    By CBCberger in forum Realm of the Mad God Help & Requests
    Replies: 6
    Last Post: 06-30-2013, 02:58 PM
  4. [TuT] How to edit textures (Scope)
    By Venturo London in forum WarRock Skinning
    Replies: 27
    Last Post: 09-02-2011, 04:07 AM
  5. how to edit .mrs tut
    By GG2GG in forum Gunz General
    Replies: 0
    Last Post: 03-09-2008, 04:54 PM