runelite-proxy: hexdump packets

This commit is contained in:
Adam
2017-05-20 16:33:18 -04:00
parent b8242eeed1
commit 6ea98a73e0
2 changed files with 9 additions and 1 deletions

View File

@@ -48,6 +48,11 @@
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>

View File

@@ -24,6 +24,8 @@
*/
package net.runelite.proxy;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
@@ -81,7 +83,8 @@ public class PacketCopy extends Thread
read += r;
}
logger.info("Read packet opcode {} length {}", packetOpcode, packetLength);
String hexdump = ByteBufUtil.prettyHexDump(Unpooled.wrappedBuffer(b));
logger.info("Read packet opcode {} length {}\n{}", packetOpcode, packetLength, hexdump);
// Write out
ProxyRunner.writeOpcode(outCipher, out, packetOpcode);