Hello
i want to send a move Packet to the game Nova Raider. I already sniffed the Packet (was pretty easy, because they are not encoded). So i send the Packet and the Packet shows up in WireShark. But nothing happens ingame.
The sniffed Packet:
{\"data\":{\"qid\":\"27\",\"data\":{\"x\":\"40\",\ "x0\":\"42\",\"y\":\"8\",\"y0\":\"9\",\"time\":\"1 34\"},\"method\":\"POST\"},\"sid\":\""+sid[1] + "\",\"uri\":\"/rest/mainship/move\"}"
My function to send the Packet:
Code:
int PORT_NO = Port;
string SERVER_IP = Server;
TcpClient client = new TcpClient(SERVER_IP, PORT_NO);
NetworkStream nwStream = client.GetStream();
byte[] bytesToSend = ASCIIEncoding.ASCII.GetBytes(_data);
rtB.Invoke((MethodInvoker)delegate
{
rtB.Text += Environment.NewLine + "Sending : " + _data;
});
nwStream.Write(bytesToSend, 0, bytesToSend.Length);
byte[] bytesToRead = new byte[client.ReceiveBufferSize];
int bytesREad = nwStream.Read(bytesToRead, 0, client.ReceiveBufferSize);
rtB.Invoke((MethodInvoker)delegate
{
rtB.Text += Environment.NewLine + "Received : " + Encoding.ASCII.GetString(bytesToRead, 0, bytesREad);
});
client.Close();