|
You last visited: Today at 14:04
Advertisement
How?- receive packets -nuconnector&.Net
Discussion on How?- receive packets -nuconnector&.Net within the SRO Coding Corner forum part of the Silkroad Online category.
08/25/2011, 20:50
|
#1
|
elite*gold: 0
Join Date: Jul 2011
Posts: 31
Received Thanks: 5
|
How?- receive packets -nuconnector&.Net
what is the best way to receive data from nuconnector on .Net ??
byte [], List<byte[]> ,List<ArraySegment<byte>>;
or what ??
and what is the format that Nuconnector us to send data to the bot !!!
?
Thank You
|
|
|
08/25/2011, 21:30
|
#2
|
elite*gold: 0
Join Date: Aug 2007
Posts: 194
Received Thanks: 1,091
|
MemoryStream + BinaryReader
NuConnector Packet Structure:
DataLength Int16, Opcode Int16, SendType Int16, DATA as Byte()
|
|
|
08/25/2011, 22:45
|
#3
|
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
|
Quote:
Originally Posted by s2k
MemoryStream + BinaryReader
NuConnector Packet Structure:
DataLength Int16, Opcode Int16, SendType Int16, DATA as Byte()
|
Basicly
Code:
Dim ms as new MemoryStream(data() as byte from nuconnector)
Dim bn as new binaryreader(ms)
bn.read(w/e)
|
|
|
08/25/2011, 22:54
|
#4
|
elite*gold: 0
Join Date: Jan 2009
Posts: 314
Received Thanks: 686
|
Could look like this
Code:
public class ProxyConnection
{
private static Socket m_ProxySocket;
private static byte[] m_buffer;
private static bool m_isClosing;
public static bool Connect(ushort ProxyPort)
{
if (m_ProxySocket == null)
{
m_ProxySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
}
if (m_ProxySocket.Connected)
{
m_isClosing = true;
m_ProxySocket.Shutdown(SocketShutdown.Both);
m_ProxySocket.Close();
m_ProxySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
}
if (m_buffer == null)
{
m_buffer = new byte[8192];
}
try
{
m_isClosing = false;
m_ProxySocket.Connect(IPAddress.Loopback, ProxyPort);
m_ProxySocket.BeginReceive(m_buffer, 0, 8192, SocketFlags.None, new AsyncCallback(WaitForData), m_ProxySocket);
return true;
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
return false;
}
}
private static void WaitForData(IAsyncResult ar)
{
if (m_ProxySocket != null)
{
if (m_isClosing == false)
{
try
{
Socket worker = (Socket)ar.AsyncState;
if (worker.EndReceive(ar) > 0)
{
var packet = new phPacket(m_buffer);
lock (m_packetQueue)
{
//Queue or process the packet.
}
worker.BeginReceive(m_buffer, 0, 8192, SocketFlags.None, new AsyncCallback(WaitForData), worker);
}
else //Connection Ended
{
m_isClosing = true;
if (m_ProxySocket.Connected)
{
m_ProxySocket.Shutdown(SocketShutdown.Both);
m_ProxySocket.Close();
}
m_ProxySocket = null;
}
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
}
}
}
|
|
|
 |
Similar Threads
|
[Packets] Wie änder ich flyff packets?
07/16/2011 - Flyff Private Server - 19 Replies
HeyHo,
Ich würde sehr gerne wissen wie man die Flyff Packets ändert...
ich denke mal Zahlen ändern werden nicht ausreichen oder?
|
WPE Doesn't receive any packets (reason: server or wud? @.@)
09/09/2010 - Ragnarok Online - 1 Replies
Ok. I am a newbie and am new to WPE. I searched, I read, I followed; still, i don't see any packets on my WPE. I already targeted my ro program, and started logging -> Packets : 0 >.<"" (i moved, dropped, picked things, ran around ig tho). The server i tried on was DreamerRo Nightmare Low rate (CS-Arena.com - professionelles Game-, Rootserver- & Housingbusiness). Sooo yea... I really appreciate every piece of advice from everyone. *-*
Thankss:confused:
|
AutoIT Packets an SRO Gameserver senden via TCP & NuConnector
05/09/2010 - AutoIt - 6 Replies
Hi, also ich versuche gerade weiter mit AutoIT klarzukommen und endlich mal einen Bot(Für Silkroad via NuConnector oder anderes^^) zuschreiben der mit Packets arbeitet, aber irgendwie komme ich nicht weiter, also ich muss ja mit dem Befehl "TCPSend()" arbeiten, aber wie genau mache ich dass, ein Beispiel oder ein Tutorial(Deutsch) wäre nett, wodurch ich das nachvollziehen könnte, habe leider bis jetzt nichts richtiges gefunden, was mir dort weitergeholfen hat.
THX im voraus.
MfG
GomaTa
|
my skill's don't receive XP
03/10/2010 - 9Dragons - 4 Replies
EDIT:
Close topic
|
edit/transfer/receive packets no detected from GG
03/16/2009 - Dekaron - 1 Replies
i want to know if someone can tell me the name(s) of a program to edit send and receive packets to use it in 2moons without getting caught by GG i tryed WPE but GG detects it as a troyan so pls someone help!!!
thnx
|
All times are GMT +1. The time now is 14:04.
|
|