HELLO packet no more has toString method?

Posts 115 of 17 · Page 1 of 2
HELLO packet no more has toString method?
How can I find out what properties it contains now?
I've just found this error when trying my proxy

here is hello

package _-nU{
import flash.utils.ByteArray;
import flash.utils.IDataOutput;

public class _-WV extends _-1W2 {

public var _-0UK:String;
public var gameId_:int = 0;
public var _-1Dk:String;
public var _-02y:String;
public var _-kx:String;
public var keyTime_:int = 0;
public var key_:ByteArray;
public var _-1Pr:String;
public var _-05g:String = "";
public var _-0tt:String = "";
public var _-0l-:String = "";
public var _-Zu:String = "";
public var _-1pE:String = "";
public var _-Sy:int = 20934212;

public function _-WV(_arg1:uint, _arg2:Function){
this._-0UK = new String();
this._-1Dk = new String();
this._-02y = new String();
this._-kx = new String();
this.key_ = new ByteArray();
this._-1Pr = new String();
super(_arg1, _arg2);
}

override public function writeToOutput(_arg1:IDataOutput):void{
_arg1.writeUTF(this._-0UK);
_arg1.writeInt(this._-Sy);
_arg1.writeInt(this.gameId_);
_arg1.writeUTF(this._-kx);
_arg1.writeUTF(this._-02y);
_arg1.writeUTF(this._-1Dk);
_arg1.writeInt(this.keyTime_);
_arg1.writeShort(this.key_.length);
_arg1.writeBytes(this.key_);
_arg1.writeInt(this._-1Pr.length);
_arg1.writeUTFBytes(this._-1Pr);
_arg1.writeUTF(this._-05g);
_arg1.writeUTF(this._-0l-);
_arg1.writeUTF(this._-Zu);
_arg1.writeUTF(this._-0tt);
_arg1.writeUTF(this._-1pE);
_arg1.writeInt(34329);
}

override public function toString():String{
return ("");
}


}
}//package _-nU
I still seem to have error with guid. It throws something like EOFException

Edit: Had the new integers at wrong place
Okay now it's not giving any errors but it echoes this:
CLI HELLO after391 before400
Did you get past this @NisuxenZ ?
Quote Originally Posted by CrazyJani View Post
Okay now it's not giving any errors but it echoes this:
CLI HELLO after391 before400
Did you get past this @NisuxenZ ?
That mean the packet byte length isn't the same from in and out

Double check it you forgot something
Quote Originally Posted by IziLife View Post
That mean the packet byte length isn't the same from in and out
I know but I have no idea what causes that. HelloPacket.java gives no more errors at least
Quote Originally Posted by CrazyJani View Post
Okay now it's not giving any errors but it echoes this:
CLI HELLO after391 before400
Did you get past this @NisuxenZ ?
I tried to do a quick fix following jnoob's code and managed to get no where.
Quote Originally Posted by NisuxenZ View Post
I tried to do a quick fix following jnoob's code and managed to get no where.
Client? Proxy?

Because fixing aproxy is easy. You correct what you read from the client according to what you write in writeToOutput.
Forging a hello packet (for a standalone client) is probably not so simple
wwaaaaait.. Those two ints are CONSTANTS , so..wtf
Modified JustAnoobROTMG's code

Code:
package realmrelay.packets.client;

import java****.DataInput;
import java****.DataOutput;
import java********Exception;
import java.util.Arrays;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Arrays;
import realmrelay.packets.Packet;

public class HelloPacket extends Packet {
	public String buildVersion;
	public int unkint;
	public int unkint2;
	public int gameId; // int
	public String guid;
	public String password;
	public String secret;
	public int keyTime; // int
	public byte[] key;
	public String unkStr;
	public String pk;
	public String Tq;
	public String H;
	public String playPlatform;
	public int idk;
	public byte idkey[];

	public HelloPacket(DataInput read) {
		pk = "";
		Tq = "";
		H = "";
		playPlatform = "";
		try {
			// type = Packet.HELLO;
			parseFromInput(read);
		} catch (IOException e) {
		}
	}

	public HelloPacket() {
		pk = "";
		Tq = "";
		H = "";
		playPlatform = "";
		// type = Packet.HELLO;
	}

	public void parseFromInput(DataInput read) throws IOException {
		 buildVersion = read.readUTF();
         unkint = read.readInt();
         gameId = read.readInt();
         secret = read.readUTF();
         password = read.readUTF();
         guid = read.readUTF();
        
        

         keyTime = read.readInt();
             key = new byte[read.readUnsignedShort()];
             read.readFully(key);

         byte buf[] = new byte[read.readInt()];
         read.readFully(buf);
         unkStr = new String(buf, Charset.forName("UTF-8"));
         
         pk = read.readUTF();
         Tq = read.readUTF();
         H = read.readUTF();
         playPlatform = read.readUTF();
         
         unkint2 = read.readInt();
         //idkey = new byte[idk];
         //read.readFully(idkey);
    
     } 
	public void writeToOutput(DataOutput write) throws IOException {
		 write.writeUTF(buildVersion);
         write.writeInt(unkint);
         write.writeInt(gameId);
         write.writeUTF(secret);
         write.writeUTF(password);
         write.writeUTF(guid);
         write.writeInt(keyTime);
  
         if(key != null)
         {
             write.writeShort(key.length);
             write.write(key);
         } else
         {
             write.writeShort(0);
         }
         if(unkStr != null)
         {
             byte buf[] = unkStr.getBytes("UTF-8");
             write.writeInt(buf.length);
             write.write(buf);
         } else
         {
             write.writeInt(0);
         }
         write.writeUTF(pk);
         write.writeUTF(Tq);
         write.writeUTF(H);
         write.writeUTF(playPlatform);
         
         write.writeInt(unkint2);
         if(idkey != null)
         {
             write.writeShort(idkey.length);
             write.write(idkey);
         } else
         {
             write.writeShort(0);
         }
     }

	public String toString() {
		return (new StringBuilder()).append("HELLO_PACKET: buildVersion=")
				.append(buildVersion).append(" gameId=").append(gameId)
				.append(" guid=").append(guid).append(" pw=").append(password)
				.append(" secret=").append(secret).append(" keyTime=")
				.append(keyTime).append("  key=").append(Arrays.toString(key))
				.append(" unkStr=").append(unkStr).append(" pk=").append(pk)
				.append(" Tq=").append(Tq).append(" H=").append(H)
				.append(" playPlatform=").append(playPlatform).append(" idk=")
				.append(idk).append(" idkey=").append(idkey).toString();
	}

}
Quote Originally Posted by mSteaker View Post
Modified JustAnoobROTMG's code
How can I see no modifications? You just copy pasted the code
Quote Originally Posted by CrazyJani View Post
How can I see no modifications? You just copy pasted the code
Uncommented and changed the order.
Thanks wetish, Your most recent edit works like a charm. In addition i'd also like to thank JNoob as well.
so guys, please help out us lesser mortals. all we have to do is update the HelloPacket.java to the correct order and type of the fields and RR works again, amirite??
If so, can someone do that?

edit: well another forum has done that already
Got a question whats that?? What should i put in there for the ****? first 2 -> . com or? and the third one??

import java****.DataInput;
import java****.DataOutput;
import java********Exception;
Posts 115 of 17 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?