SolvedRealm relay

Posts 1–6 of 6 · Page 1 of 1
Realm relay
I need to update the hello packet in realm relay i got this code from maat7043 aio tool
Code:
class
 refid "_-1F9:_-6d"
 instance QName(PackageNamespace("_-1F9"), "_-6d")
  extends QName(PackageNamespace("_-1F9"), "_-0HL")
  flag SEALED
  flag PROTECTEDNS
  protectedns ProtectedNamespace("_-13a")
  iinit
   refid "_-1F9:_-6d/instance/init"
   param QName(PackageNamespace("", "#0"), "uint")
   param QName(PackageNamespace("", "#0"), "Function")
   body
    maxstack 5
    localcount 5
    initscopedepth 6
    maxscopedepth 7
    code
     getlocal0
     pushscope

     getlocal0
     findpropstrict      QName(PackageNamespace("", "#0"), "String")
     constructprop       QName(PackageNamespace("", "#0"), "String"), 0
     initproperty        QName(PackageNamespace("", "#0"), "buildVersion_")

     getlocal0
     findpropstrict      QName(PackageNamespace("", "#0"), "String")
     constructprop       QName(PackageNamespace("", "#0"), "String"), 0
     initproperty        QName(PackageNamespace("", "#0"), "guid_")

     getlocal0
     findpropstrict      QName(PackageNamespace("", "#0"), "String")
     constructprop       QName(PackageNamespace("", "#0"), "String"), 0
     initproperty        QName(PackageNamespace("", "#0"), "password_")

     getlocal0
     findpropstrict      QName(PackageNamespace("", "#0"), "String")
     constructprop       QName(PackageNamespace("", "#0"), "String"), 0
     initproperty        QName(PackageNamespace("", "#0"), "secret_")

     getlocal0
     findpropstrict      QName(PackageNamespace("flash.utils"), "ByteArray")
     constructprop       QName(PackageNamespace("flash.utils"), "ByteArray"), 0
     initproperty        QName(PackageNamespace("", "#0"), "key_")

     getlocal0
     findpropstrict      QName(PackageNamespace("", "#0"), "String")
     constructprop       QName(PackageNamespace("", "#0"), "String"), 0
     initproperty        QName(PackageNamespace("", "#0"), "_-Z2")

     getlocal0
     getlocal1
     getlocal2
     constructsuper      2

     returnvoid
    end ; code
   end ; body
  end ; method
  trait slot QName(PackageNamespace("", "#0"), "buildVersion_") type QName(PackageNamespace("", "#0"), "String") end
  trait slot QName(PackageNamespace("", "#0"), "gameId_") type QName(PackageNamespace("", "#0"), "int") value Integer(0) end
  trait slot QName(PackageNamespace("", "#0"), "guid_") type QName(PackageNamespace("", "#0"), "String") end
  trait slot QName(PackageNamespace("", "#0"), "password_") type QName(PackageNamespace("", "#0"), "String") end
  trait slot QName(PackageNamespace("", "#0"), "secret_") type QName(PackageNamespace("", "#0"), "String") end
  trait slot QName(PackageNamespace("", "#0"), "keyTime_") type QName(PackageNamespace("", "#0"), "int") value Integer(0) end
  trait slot QName(PackageNamespace("", "#0"), "key_") type QName(PackageNamespace("flash.utils"), "ByteArray") end
  trait slot QName(PackageNamespace("", "#0"), "_-Z2") type QName(PackageNamespace("", "#0"), "String") end
  trait slot QName(PackageNamespace("", "#0"), "_-LR") type QName(PackageNamespace("", "#0"), "String") value Utf8("") end
  trait slot QName(PackageNamespace("", "#0"), "_-0JZ") type QName(PackageNamespace("", "#0"), "String") value Utf8("") end
  trait slot QName(PackageNamespace("", "#0"), "_-1fu") type QName(PackageNamespace("", "#0"), "String") value Utf8("") end
  trait slot QName(PackageNamespace("", "#0"), "_-mD") type QName(PackageNamespace("", "#0"), "String") value Utf8("") end
  trait slot QName(PackageNamespace("", "#0"), "_-0mN") type QName(PackageNamespace("", "#0"), "String") value Utf8("") end
  trait method QName(PackageNamespace("", "#0"), "writeToOutput") flag OVERRIDE
   method
    refid "_-1F9:_-6d/instance/writeToOutput"
    param QName(PackageNamespace("flash.utils"), "IDataOutput")
    returns QName(PackageNamespace("", "#0"), "void")
    body
     maxstack 7
     localcount 4
     initscopedepth 6
     maxscopedepth 7
     code
      getlocal0
      pushscope

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "buildVersion_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "gameId_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeInt"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "guid_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      findpropstrict      QName(PackageNamespace("", "#0"), "int")
      getlex              QName(PackageNamespace("", "#0"), "Math")
      getlex              QName(PackageNamespace("", "#0"), "Math")
      callproperty        QName(PackageNamespace("", "#0"), "random"), 0
      pushint             1000000000
      multiply
      callproperty        QName(PackageNamespace("", "#0"), "floor"), 1
      callproperty        QName(PackageNamespace("", "#0"), "int"), 1
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeInt"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "password_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      findpropstrict      QName(PackageNamespace("", "#0"), "int")
      getlex              QName(PackageNamespace("", "#0"), "Math")
      getlex              QName(PackageNamespace("", "#0"), "Math")
      callproperty        QName(PackageNamespace("", "#0"), "random"), 0
      pushint             1000000000
      multiply
      callproperty        QName(PackageNamespace("", "#0"), "floor"), 1
      callproperty        QName(PackageNamespace("", "#0"), "int"), 1
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeInt"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "secret_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "keyTime_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeInt"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "key_")
      getproperty         QName(PackageNamespace("", "#0"), "length")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeShort"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "key_")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeBytes"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-Z2")
      getproperty         QName(PackageNamespace("", "#0"), "length")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeInt"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-Z2")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTFBytes"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-LR")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-0JZ")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-1fu")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-mD")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      getlocal1
      getlocal0
      getproperty         QName(PackageNamespace("", "#0"), "_-0mN")
      callpropvoid        QName(Namespace("flash.utils:IDataOutput"), "writeUTF"), 1

      returnvoid
     end ; code
    end ; body
   end ; method
  end ; trait
  trait method QName(PackageNamespace("", "#0"), "toString") flag OVERRIDE
   method
    refid "_-1F9:_-6d/instance/toString"
    returns QName(PackageNamespace("", "#0"), "String")
    body
     maxstack 9
     localcount 1
     initscopedepth 6
     maxscopedepth 7
     code
      getlocal0
      pushscope

      findpropstrict      QName(ProtectedNamespace("_-L1"), "formatToString")
      pushstring          "HELLO"
      pushstring          "buildVersion_"
      pushstring          "gameId_"
      pushstring          "guid_"
      pushstring          "password_"
      pushstring          "secret_"
      callproperty        QName(ProtectedNamespace("_-L1"), "formatToString"), 6
      returnvalue
     end ; code
    end ; body
   end ; method
  end ; trait
 end ; instance
 cinit
  refid "_-1F9:_-6d/class/init"
  body
   maxstack 3
   localcount 1
   initscopedepth 5
   maxscopedepth 6
   code
    getlocal0
    pushscope

    returnvoid
   end ; code
  end ; body
 end ; method
end ; class
how can i compile this with eclipse and what plugins if any do i need to have, so i can i put it into realm relay and use it?
That's written in AS3 you would have to make a Java class using the code.
Do i just need to make a java class and then paste the code in. Or is there another way that I am supposed to use this code?
heres your answer http://www.mpgh.net/forum/655-realm-...ml#post9450170

repost for visibility credits go to kola95
Code:
public class HelloPacket extends Packet {

    public String buildVersion;
    public int gameId;
    public String guid;
    public String password;
    public String secret;
    public int randomInt1;
    public int randomInt2;
    public int keyTime;

    public byte[] key = new byte[0];
    public byte[] obf0 = new byte[0];
    public byte[] string = new byte[0]; //can be deleted

    public String obf1;
    public String obf2;
    public String obf3;
    public String obf4;
    public String obf5;

    @
    Override
    public void parseFromInput(DataInput in ) throws IOException {
        
    	this.buildVersion = in.readUTF();
    	this.gameId = in.readInt();
    	this.guid = in.readUTF();
    	this.randomInt1 = in.readInt();
    	this.password = in.readUTF();
    	this.randomInt2 = in.readInt();
    	this.secret = in.readUTF();
    	
    	this.keyTime = in.readInt();
    	this.key = new byte[in.readShort()];
    	in.readFully(this.key);
    	this.obf0 = new byte[in.readInt()];
    	in.readFully(this.obf0);
    	
    	this.obf1 = in.readUTF();
        this.obf2 = in.readUTF();
        this.obf3 = in.readUTF();
        this.obf4 = in.readUTF();
        this.obf5 = in.readUTF();

    }

    @
    Override
    public void writeToOutput(DataOutput out) throws IOException {
        out.writeUTF(this.buildVersion);
        out.writeInt(this.gameId);
        out.writeUTF(this.guid);
        out.writeInt(this.randomInt1);
        out.writeUTF(this.password);
        out.writeInt(this.randomInt2);
        out.writeUTF(this.secret);
        
        out.writeInt(this.keyTime);
        out.writeShort(this.key.length);
        out.write(this.key);
        out.writeInt(this.obf0.length);
        out.write(this.obf0);
        
        out.writeUTF(this.obf1);
        out.writeUTF(this.obf2);
        out.writeUTF(this.obf3);
        out.writeUTF(this.obf4);
        out.writeUTF(this.obf5);
    }

}



also update the 2 encryption keys (check my posts i put them up somewhere) in the realmrelay.java and the settings.properties. i dont know if u need to update at both places, i did tho.
theoretically u need to update accountlist packet as well, but since i have not seen a single script where it is used, i THINK you can just ignore updating it.


more background on "what you are supposed to do with" that code YOU linked:
from it you can learn how a hello packet is structured. check YOUR as3 code with the 'solution' java code, i hope you see the similarities
Solved. Used the Realm Relay provided by zbornox on his github
Quote Originally Posted by megadragon2 View Post
Solved. Used the Realm Relay provided by zbornox on his github
@Raple @Lovroman
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us