Hallo StageTwo.de !
Da ich grade daran bin, die "alte" arcane souce mal neu aufzubaun, will ich nun zu isro client welchseln, dafür brauch ich aber die OpCodes vom GameServer und LoginServer !
GameServer ist eigentlich zimlich einfach zu sniffen, aber wenn mir einer helfen will, ist er natürlich willkommen !
Das größte problem habe ich beim LoginServer, wenn sich mit loginserver sniffen einer auskennt, bitte melden!
( z.b. tutorial link schicken, wie ich LoginServer sniffen kann oder so )
Hier mal der Code, den ich umschreiben muss, mit neuen OpCodes
[cs] case 0x2001:
sys.GateWay();
break;
case 0x6100:
sys.Patch();
break;
case 0x6101:
sys.ServerList();
break;
case 0x6102:
sys.Connect();
break;
case 0x6104:
sys.Launcher();
break;
case 1905:
UserTablo(de.buffer);
break;[/cs]
Auserdem noch das alles -.-
[cs] private static uint current_version = 702;//702;
public static byte[] GateWayPacket()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x2001);
Writer.Text("GatewayServer");
Writer.Byte(0);
return Writer.GetBytes();
}
public static byte[] LoadGame_1()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0101);
Writer.Word(0x0500);
Writer.Byte(0x20);
return Writer.GetBytes();
}
public static byte[] LoadGame_2()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0100);
Writer.Word(0x0100);
Writer.Byte(0x69);
Writer.Byte(0x0C);
Writer.DWord(0x00000005);
Writer.Byte(0x02);
return Writer.GetBytes();
}
public static byte[] LoadGame_3()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0101);
Writer.Word(0x0500);
Writer.Byte(0x60);
return Writer.GetBytes();
}
public static byte[] LoadGame_4()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0300);
Writer.Word(0x0200);
Writer.Word(0x0200);
return Writer.GetBytes();
}
public static byte[] LoadGame_5()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0101);
Writer.Word(0);
Writer.Byte(0xA1);
return Writer.GetBytes();
}
public static byte[] LoadGame_6()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0100);
return Writer.GetBytes();
}
public static byte[] Version_1() // if server version = client version
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Word(0x0100);
return Writer.GetBytes();
}
public static byte[] Version_2() // if server version > client version, here we can implement a download server
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Byte(0);
Writer.Byte(2);
Writer.Byte(2);
Ini config = new Ini(Environment.CurrentDirectory + @"\config\server_login.ini"); //eig unwichtig...
string ip = config.GetValue("DOWNLOADSERVER", "ip").ToString();
Writer.Byte((byte)ip.Length); // ip lenght
Writer.Text(ip); // DownloadServer IP .
Writer.Word(16002); // DownloadServer port
Writer.DWord(current_version);
// TODO: list new files here
return Writer.GetBytes();
}
public static byte[] LoadGame_7()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Byte(1);
Writer.Byte(1);
Writer.Byte(0);
Writer.Byte(4);
Writer.Byte(0xA1);
return Writer.GetBytes();
}
public static byte[] NewsListPacket()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0x600D);
Writer.Byte(0);
Writer.Byte((byte)Systems.News_List.Count);
foreach (NewsList n in Systems.News_List)
{
Writer.Text(n.Head);
Writer.Text(n.Msg);
Writer.Word(0);
Writer.Word(n.Month);
Writer.Word(n.Day);
Writer.Word(0);
Writer.LWord(0);
}
Writer.Word(0); // close pack
return Writer.GetBytes();
}
public static byte[] ServerListPacket()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA101);
Writer.Word(0x0201);
Writer.Text("Silkroad_Korea_Yahoo_Official"); // keine arnung ,was das von Isro ist -.-
Writer.Byte(0);
MySQL ms = new MySQL("SELECT * FROM server");
using (MySql.Data.MySqlClient.MySqlDataReader reader = ms.Read())
{
while (reader.Read())
{
Writer.Bool(true);
Writer.Word(reader.GetInt16(1)); //server id
Writer.Text(reader.GetString(2)); //server name
Writer.Word(User_Current);
Writer.Word(reader.GetInt16(4)); //User_max
Writer.Byte(reader.GetByte(5)); // Server Status
}
}
ms.Close();
Writer.Byte(0);
return Writer.GetBytes();
}
public byte[] WorngInformation()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA102);
Writer.Byte(2); //failed
Writer.Byte(1); //wrong password
Writer.Byte(WrongForPassword);
Writer.Word(0);
Writer.Byte(0);
Writer.Byte(3); //Max Wrong Password/Username
Writer.Word(0);
Writer.Byte(0);
return Writer.GetBytes();
}
public static byte[] ConnectWrong(ushort type)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA102);
Writer.Word(type);
return Writer.GetBytes();
}
public static byte[] ConnectSucces(string ip, short port, byte type)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA102);
Writer.Byte(1);
Writer.Byte(type);
Writer.Byte(0);
Writer.Word(0);
Writer.Text(ip);
Writer.Word(port);
Writer.Byte(3);
return Writer.GetBytes();
}
public static byte[] ConnectTest()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA323);
Writer.Byte(1);
return Writer.GetBytes();
}[/cs]
Also entweder per PM melden , oder den C# code nehmen , und die opcodes ändern ( bitte jedesmal mit "//Geändert" Kennzeichen, z.b. :
[cs] PacketWriter Writer = new PacketWriter();
Writer.Create(0xA323); //geändert
Writer.Byte(1);
return Writer.GetBytes();[/cs]
Danke schonmal im vorraus , was mir auch was bringt, einfach mir ein TUT schicken , wie ich loginserver Sniffen kann.
MFG: Mike !
//edit by dongdong: Längeren Source code bitte immer in Expander packen.
//Edit by Mike3246: Mach ich nächstes mal, sry wusste ich nich, danke das du es für mich geändert hast