S
Sheepy
Gast
Hallo Leute,
ich hab ein Problem mit TCP/IP Packeten usw.
Ich versuche verzweifelt, TCP PAckete via JPcap hinaus ind ie welt zu schicken, nur antwortet, laut WireShark niemand darauf.
Ich hab die gnaz normale Handshakeprozedur versucht, aber nichtmal ein Packet, von wegen, ne hier geht das nicht weil Port zu und so PAcket zurückbekommen.
Es geht mir letztendlich einen 3-Wege-Handshake mit einen Gameserver hinzubekommen, und somit mich als Client zu indentifizieren.
Hat jemand dort eine Idee, warum das nciht funktioniert.
Bei Wireshark, bekomme ich schwarz unterlegte Zeilen.
Mein Anfang sieht erstmal so aus:
ich hab ein Problem mit TCP/IP Packeten usw.
Ich versuche verzweifelt, TCP PAckete via JPcap hinaus ind ie welt zu schicken, nur antwortet, laut WireShark niemand darauf.
Ich hab die gnaz normale Handshakeprozedur versucht, aber nichtmal ein Packet, von wegen, ne hier geht das nicht weil Port zu und so PAcket zurückbekommen.
Es geht mir letztendlich einen 3-Wege-Handshake mit einen Gameserver hinzubekommen, und somit mich als Client zu indentifizieren.
Hat jemand dort eine Idee, warum das nciht funktioniert.
Bei Wireshark, bekomme ich schwarz unterlegte Zeilen.
Mein Anfang sieht erstmal so aus:
Code:
public class MyClass {
public MyClass() throws UnknownHostException, Exception{
NetworkInterface[] devices = JpcapCaptor.getDeviceList();
send(makeTCPPacket(devices[2]));
}
public static void send(Packet packet) throws Exception
{
NetworkInterface[] devices = JpcapCaptor.getDeviceList();
JpcapSender sender = JpcapSender.openDevice(devices[2]);
sender.sendPacket(packet);
sender.close();
}
public static void main(String[] args) throws UnknownHostException, Exception{
new MyClass();
}
public TCPPacket makeTCPPacket(NetworkInterface d) throws UnknownHostException{
TCPPacket newtcpp = new TCPPacket(49184,14534,56,57,false,false,false,false,true,false,false,false,10,10);
newtcpp.sequence = 100;
newtcpp.syn = true;
InetAddress inet1 = InetAddress.getByName( "91.62.91.105" );
InetAddress inet2 = InetAddress.getByName( "www.google.de" );
newtcpp.setIPv4Parameter(0,false,false,false,0,false,false,false,0,1010101,100,IPPacket.IPPROTO_TCP,
inet1,inet2);
// set the data field of the packet
newtcpp.data=("HALLO").getBytes();
// create an Ethernet packet (frame)
EthernetPacket ether = new EthernetPacket();
// set frame type as IP
ether.frametype = EthernetPacket.ETHERTYPE_IP;
// set source and destination MAC addresses
ether.dst_mac = new byte[]{(byte)0,(byte)19,(byte)141,(byte)225,(byte)23,(byte)32};
ether.dst_mac = d.mac_address;
ether.src_mac = new byte[]{(byte)0,(byte)4,(byte)14,(byte)116,(byte)246,(byte)147};
ether.src_mac = d.mac_address;
// set the datalink frame of the packet p as ether
newtcpp.datalink = ether;
return newtcpp;
}
}