|
You last visited: Today at 09:59
Advertisement
Sending Packet
Discussion on Sending Packet within the .NET Languages forum part of the Coders Den category.
01/17/2016, 00:10
|
#1
|
elite*gold: 0
Join Date: Jan 2016
Posts: 28
Received Thanks: 5
|
Sending Packet
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();
|
|
|
01/17/2016, 13:18
|
#2
|
elite*gold: 8
Join Date: Sep 2014
Posts: 625
Received Thanks: 178
|
You have to use the clients connection if you want to see the client affected.
|
|
|
01/18/2016, 07:22
|
#3
|
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
|
Quote:
Originally Posted by xTrion
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();
|
Don't make a new connection, you have to use the asm send function for your packet emission
|
|
|
01/25/2016, 02:29
|
#4
|
elite*gold: 75
Join Date: Mar 2009
Posts: 528
Received Thanks: 21
|
Either use the game connection or make a proxy, make the game use the proxy and modify the packets however you want, since you said they are not encrypted, it shouldn't be a problem, at all.
|
|
|
 |
Similar Threads
|
Packet sending
01/26/2012 - General Coding - 9 Replies
Hey,
I have manged to hook, wsasend()/wsarecv()... But why is the sent data different to the data I logg with a packeteditor?
How I mange it to send a packet?
--------------
Ich habe es geschafft die wsasend()/wsarecv Funktionen zu hooken. Aber warum sind die Daten die ich dort abfange anders, als die die ich mit wpe pro sniffe?
|
c# sending packet
11/22/2011 - .NET Languages - 0 Replies
i enter an online flash game from my app webbrowser tho i cant find out how to send packets trougth it :S.
i managed to send packets trought WPE PRO tho i want to code it into my proggy.
i dont think i need to hook my own app am i?
|
Need help sending a packet !
02/28/2010 - Kal Online - 1 Replies
i've got a Question and i hope some1 can help me
there is an item at a NPC that u can buy 1 only each time .. and i need to buy 1000000 of it
so i need to send the packet to buy this item 1000000 times
when i try to sniff the packet to buy this item i got :
Packet type : 0x18
format : m
arguments : (unknown character)
so ... how can i send that (unknown character) as an argument ??
in the code that (unknown character) is displayed from "(DWORD)va_arg(args,DWORD)"
when i tried to save...
|
sending packet at WPe
07/18/2008 - Dekaron - 10 Replies
after sending some packet at WPE my connection to 2moons always got disconnect the moment I send the packet
can someone help me regargding this
|
sending a packet
11/26/2007 - Conquer Online 2 - 3 Replies
I've captured a packet that I'd like to re-send to do a specific function, but I don't know how to do that. I know it involves 4 encryption keys and a packet id number. My best guess is to send the packet to a proxy that hopefully will forward it to the server properly. Anyone want to offer some tips on what to use?
|
All times are GMT +1. The time now is 10:00.
|
|