|
You last visited: Today at 15:24
Advertisement
Nostale packet to official server problem
Discussion on Nostale packet to official server problem within the Nostale forum part of the MMORPGs category.
04/12/2016, 14:45
|
#1
|
elite*gold: 0
Join Date: Jun 2013
Posts: 29
Received Thanks: 9
|
Nostale packet to official server problem
Hello,
I am trying to make an C# application that will verify if your nostale login informations are good.
In PHP, I sent the packet "NoS0575 6322112 USERNAME 109177246F927042641467C191156B736755635463B1358334 5 00332B980.9.3.3055 0 B5D5C01C083E1F954259316FE2206F9D", and it returned me the list of the channels, so it works in PHP.
But then I tried with C#, and it respond me "fail An error occured .. Try again" but I have the same socket connection as php and good cryptography (I think)
Here is my C# connection :
Code:
string packet = "NoS0575 6322112 USERNAME 109177246F927042641467C191156B736755635463B13583345 00332B980.9.3.3055 0 B5D5C01C083E1F954259316FE2206F9D";
byte[] bytesToSend = Cryptography.EncryptLogin(packet);
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, 0);
s.Connect(SERVER_IP, PORT_NO);
byte[] bytes = new byte[bytesToSend.Length];
s.Send(bytesToSend, bytesToSend.Length, SocketFlags.None);
s.Receive(bytes, bytesToSend.Length, SocketFlags.None);
string decrypted = Cryptography.DecryptLogin(bytes, bytesToSend.Length);
Console.WriteLine(decrypted);
And my cryptography:
Code:
public static string DecryptLogin(byte[] bytes, int length)
{
for (int i = 0; i <= length - 1; i++)
{
try
{
bytes[i] = Convert.ToByte(bytes[i] - 15);
}
catch (Exception ex)
{
bytes[i] = Convert.ToByte((bytes[i] - 15) + 256);
}
}
return System.Text.Encoding.UTF8.GetString(bytes).Substring(0, length);
}
public static byte[] EncryptLogin(string packet)
{
string str_enc = "";
for (int i = 0; i < packet.Length; i++)
{
str_enc += chr((ord(packet[i].ToString()) ^ 195) + 15);
}
str_enc += ((byte)216).ToString();
return StringToByte(str_enc += chr(216));
}
public string EncryptPassword(string password) //I don't use this func at the moment.
{
Random rnd = new Random();
string str_hex = ToHex(password).ToUpper();
int pos = rnd.Next(0, 22);
byte[] secondtable = { 46, 42, 23, 79, 32, 36, 71, 17, 91, 55, 83, 67, 21, 52, 69, 37, 75, 29, 47, 88, 43, 50, 99 };
string pw_enc = ToHex(chr(secondtable[pos]).ToString()).ToUpper();
for (int i = 0; i < str_hex.Length; i += 2)
{
pw_enc += ToHex((chr((secondtable[pos] & 240) / 16))).ToUpper();
pw_enc += str_hex[i];
pw_enc += ToHex((chr(secondtable[pos] & 15)).ToString()).ToUpper();
pw_enc += str_hex[i + 1];
if (pos == 22) { pos = 0; }
else { pos++; }
}
return pw_enc;
}
Please help
|
|
|
04/12/2016, 17:51
|
#2
|
elite*gold: 0
Join Date: Jul 2014
Posts: 283
Received Thanks: 317
|
You know that there's an encrypted password&md5 of nostalex.dat+nostale.dat, right? Also, there is one char where it's not space, but other char (can be seen below)
PHP Code:
$HASH = strtoupper(md5(file_get_contents($path.'NostaleX.dat', true))) .strtoupper(md5(file_get_contents($path.'Nostale.dat', true)));
$login_packet = "NoS0575 10039722 ".$ID." ".password_enc($PW)." 00564F36"; $login_packet .= chr(11); $login_packet .= "0.9.3.3055 0 ".strtoupper(md5($HASH.$ID)); $login_packet = packet_enc($login_packet);
|
|
|
04/12/2016, 19:17
|
#3
|
elite*gold: 0
Join Date: Jun 2013
Posts: 29
Received Thanks: 9
|
Thank you for your response, yes I know that I need to encrypt the password and MD5Hash, but I just want to test.
My php code without all the pass encryption and the mdp, it works just with this :
Code:
$packet = "NoS0575 3780918 enydremz8 1315732463917543641465C265146B716D527F5568B23B83325 00366E86 0.9.3.3055 0 B5D5C01C083E1F954259316FE2206F9D";
$message = packet_enc($packet);
And yes I already added the chr(11) in my C# code, but it still doesn't work, you can try yourself.
But thanks for trying to help me, I appreciate it.
|
|
|
04/13/2016, 19:00
|
#4
|
elite*gold: 0
Join Date: Aug 2013
Posts: 127
Received Thanks: 46
|
Check in OpenNos your packet
|
|
|
 |
Similar Threads
|
Search private server german nostale and sp packet clientside
11/14/2011 - Nostale - 10 Replies
hi i search[private server what is german nationality or english pserver of nostale and i have problems
can anyone give me packets to NosPacket 0.2 to DE server for Pajama +15? thank you =) with angel wings :D or without
|
S>Alz Packet Injector for Official Server Limit 5 person
10/13/2011 - Cabal Online Trading - 11 Replies
After So long then i released it because of personal purposed. So do pm me, i will list out how to use it and tutorials for it and also screenshot as proof. Dont pm me for asking bout newbie question and forr free.
So here some info :
hit mobs and scan for alz packets, stop and read packets until u find correct alz packets. Inject amount that you need then bla bla bla. Example mob drop 12 alz and we can inject amount we need exm : 100m. So every mobs will dropped 100m and bla bla bla.
...
|
Nostale Formica Packet Problem!
07/06/2011 - Nostale - 27 Replies
Hallo, ich habe da ein kleines Problem mit Formica. Immer wenn ich die
Packete machen will und dann am schluss auf Send self cmd list klicke passiert
einfach nichts gaar nichts. Ich habe es mal so probiert mit diesem Code:
c_mode 1 338571 10 5 0
Aber es klappt nichts :confused:
Danke im voraus. :handsdown:
|
All times are GMT +1. The time now is 15:28.
|
|