mmk thanks for explaining that lol. I'll see how it goes and ill ask more questions here.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
import java.net.*;
import java.io.*;
public class bnetConnection{
String host = "211.233.0.54";
Socket skt = new Socket(host, 6112);
String received;
int id;
BufferedReader myInput = new BufferedReader(new InputStreamReader(skt.getInputStream()));
PrintStream myOutput = new PrintStream(skt.getOutputStream());
buffer buff = new buffer();
bnetConnection() throws Exception {
myOutput.write(0x01);
}
public void send50() throws Exception{
System.out.println("Connected to " + host);
System.out.println("Sending Authorization");
int verb = 0x0D;
buff.addDWord(0);
buff.addString("68XI");
buff.addString("VD2D");
buff.addDWord(verb);
buff.addDWord(0);
buff.addDWord(0);
buff.addDWord(0);
buff.addDWord(0);
buff.addDWord(0);
buff.addNTString("USA");
buff.addNTString("United States");
sendpack(0x50);
System.out.println("Authorization Sent...");
id = myInput.read();
System.out.println("Received " + id);
}
public void Parseping() throws Exception{
System.out.println("Got the ping");
}
public void Parsesend50() throws Exception{
System.out.println("Got the packet 50 response");
}
/////////////////////////////////////////////////////////////////////////////
public void sendpack(int p_id) throws Exception{
myOutput.write(0xFF);
myOutput.write(p_id);
myOutput.write(buff.buffer.length + 3);
//I'm only adding 3 because when I packet log it with 4 it is one bigger
//than the actual packet
myOutput.write(buff.buffer);
}
}
0000 00 1a 70 d9 6e 5a 00 1b fc 69 78 a4 08 00 45 00 ..p.nZ.. .ix...E.
0010 00 29 06 9e 40 00 80 06 27 ae c0 a8 01 64 3f f0 .)..@... '....d?.
0020 ca 86 ec 73 17 e0 c5 3f 90 11 82 a2 44 c7 50 18 ...s...? ....D.P.
0030 fa f0 c6 48 00 00 01 ...H...
0000 00 1a 70 d9 6e 5a 00 1b fc 69 78 a4 08 00 45 00 ..p.nZ.. .ix...E.
0010 00 7b 06 9f 40 00 80 06 27 5b c0 a8 01 64 3f f0 .{..@... '[...d?.
0020 ca 86 ec 73 17 e0 c5 3f 90 12 82 a2 44 c7 50 18 ...s...? ....D.P.
0030 fa f0 b5 49 00 00 ff 50 53 00 00 00 00 36 38 58 ...I...P S....68X
0040 49 56 44 32 44 0d 00 00 00 00 00 00 00 00 00 00 IVD2D... ........
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 55 53 41 ........ .....USA
0060 00 55 6e 69 74 65 64 20 53 74 61 74 65 73 00 00 .United States..
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
0080 00 00 00 00 00 00 00 00 00 ........ .
0000 00 1b fc 69 78 a4 00 1a 70 d9 6e 5a 08 00 45 00 ...ix... p.nZ..E.
0010 00 24 6f 73 00 00 6d 11 11 d3 3f f0 ca 86 c0 a8 .$os..m. ..?.....
0020 01 64 17 e0 17 e0 00 10 1b c3 05 00 00 00 74 65 .d...... ......te
0030 6e 62 00 00 00 00 00 00 00 00 00 00 nb...... ....
0000 00 1a 70 d9 6e 5a 00 1b fc 69 78 a4 08 00 45 00 ..p.nZ.. .ix...E.
0010 00 40 06 a0 00 00 80 01 67 9a c0 a8 01 64 3f f0 .@...... g....d?.
0020 ca 86 03 03 c9 a1 00 00 00 00 45 00 00 24 6f 72 ........ ..E..$or
0030 00 00 6d 11 11 d4 3f f0 ca 86 c0 a8 01 64 17 e0 ..m...?. .....d..
0040 17 e0 00 10 1b c3 05 00 00 00 74 65 6e 62 ........ ..tenb
0000 00 1b fc 69 78 a4 00 1a 70 d9 6e 5a 08 00 45 00 ...ix... p.nZ..E.
0010 00 24 6f 73 00 00 6d 11 11 d3 3f f0 ca 86 c0 a8 .$os..m. ..?.....
0020 01 64 17 e0 17 e0 00 10 1b c3 05 00 00 00 74 65 .d...... ......te
0030 6e 62 00 00 00 00 00 00 00 00 00 00 nb...... ....
Page created in 0.195 seconds with 16 queries.