public bool CreateNexonTicket()
{
try
{
System.Net.CookieContainer webCookieContainer = new System.Net.CookieContainer();
System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(new Uri("https://api.nexon.net/auth/login"));
webRequest.CookieContainer = webCookieContainer;
webRequest.Proxy = null;
webRequest.Method = "POST";
webRequest.UserAgent = "NexonLauncher node-webkit/0.14.6 (Windows NT 6.1; WOW64) WebKit/537.36 nexon_client";
webRequest.Accept = "application/json, text/javascript, */*; q=0.01";
//Sending Request Data
byte[] Request = Encoding.ASCII.GetBytes("{\"allow_unverified\":true,\"user_id\":\"" + User.Username + "\",\"user_pw\":\"" + User.Password + "\"}");
Stream webStreamWriter = webRequest.GetRequestStream();
webStreamWriter.Write(Request, 0, Request.Length);
webStreamWriter.Close();
//Receiving Response from server
HttpWebResponse webResponse = (System.Net.HttpWebResponse)webRequest.GetResponse();
System.IO.StreamReader webStreamReader = new System.IO.StreamReader(webResponse.GetResponseStream());
string responseContent = webStreamReader.ReadToEnd();
string Token = GetStringBetween(responseContent, "{\"token\":\"", "\",\"refresh_token\":");
//New Post
webRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(new Uri("https://api.nexon.net/auth/ticket"));
webRequest.CookieContainer = webCookieContainer;
webRequest.Proxy = null;
webRequest.Method = "POST";
webRequest.UserAgent = "NexonLauncher.nxl";
webRequest.Accept = "application/json";
Request = Encoding.ASCII.GetBytes("{\"access_token\": \"" + Token + "\", \"prod_id\": \"30500\"}");
Stream webStreamWriter1 = webRequest.GetRequestStream();
webStreamWriter1.Write(Request, 0, Request.Length);
webStreamWriter1.Close();
//Receiving Response from server
HttpWebResponse webResponse1 = (System.Net.HttpWebResponse)webRequest.GetResponse();
System.IO.StreamReader webStreamReader1 = new System.IO.StreamReader(webResponse1.GetResponseStream());
responseContent = webStreamReader1.ReadToEnd();
string Ticket = GetStringBetween(responseContent, "{\"ticket\":\"", "\"}");
Form.Log("Nexon Ticket Received [" + Ticket + "]", this);
User.Ticket = Ticket;
return true;
}
catch (Exception exp)
{
Form.Log("Ticket Request Error: " + exp.ToString(), this);
return false;
}
}
public string GetStringBetween(string source, string start, string end)
{
int startIndex = source.IndexOf(start);
if (startIndex != -1)
{
int endIndex = source.IndexOf(end, startIndex + 1);
if (endIndex != -1)
{
return source.Substring(startIndex + start.Length, endIndex - startIndex - start.Length);
}
}
return string.Empty;
}
[Only registered and activated users can see links. Click Here To Register...]
public void GetNexonTicket()
{
string data = "{\"allow_unverified\":true,\"user_id\":\""+this.email+"\",\"user_pw\":\""+this.password+"\"}";
CookieContainer cookie = new CookieContainer();
HttpWebRequest webrequest = (HttpWebRequest)HttpWebRequest.Create(new Uri("https://api.nexon.net/auth/login"));
webrequest.CookieContainer = cookie;
webrequest.Method = "POST";
webrequest.Host = "api.nexon.net";
webrequest.KeepAlive = true;
webrequest.ContentLength = data.Length;
webrequest.Accept = "application/json, text/javascript, */*; q=0.01";
webrequest.Headers["Origin"] = "chrome-extension://dobbaijafcbikgimjpakclacfgeagffm";
webrequest.UserAgent = "NexonLauncher node-webkit/0.14.6 (Windows NT 6.1; WOW64) WebKit/537.36 nexon_client";
webrequest.ContentType = "application/json";
webrequest.Proxy = null;
StreamWriter write = new StreamWriter(webrequest.GetRequestStream());
write.Write(data);
write.Close();
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
StreamReader read = new StreamReader(webresponse.GetResponseStream());
var obj = JsonConvert.DeserializeObject<Dictionary<string, string>>(read.ReadToEnd());
string access_token = obj["token"];
webresponse.Close();
read.Close();
data = "{\"access_token\": \""+access_token+"\", \"prod_id\": \"30500\"}";
HttpWebRequest webrequest2 = (HttpWebRequest)HttpWebRequest.Create(new Uri("https://api.nexon.net/auth/ticket"));
webrequest2.CookieContainer = cookie;
webrequest2.Method = "POST";
webrequest2.Host = "api.nexon.net";
webrequest2.KeepAlive = true;
webrequest2.ContentLength = data.Length;
webrequest2.UserAgent = "NexonLauncher.nxl-16.07.04-59-b2d85a2";
webrequest2.ContentType = "application/json";
webrequest2.Proxy = null;
write = new StreamWriter(webrequest2.GetRequestStream());
write.Write(data);
write.Close();
webresponse = (HttpWebResponse)webrequest2.GetResponse();
read = new StreamReader(webresponse.GetResponseStream());
obj = JsonConvert.DeserializeObject<Dictionary<string, string>>(read.ReadToEnd());
this.ticket = obj["ticket"];
webresponse.Close();
read.Close();
}
First of all this emulator is not writed/coded by you but by Shadow,than you must write credits to him.Quote:
no its not the public one ;)Quote:
First of all this emulator is not writed/coded by you but by Shadow,than you must write credits to him.
The source of emulator is public and anyway you dont know how it works.
The server client must stay on virtual machine and not in the same context.
I dont belevie you , because i have alredy this source by March 2016 and in your posted image there is the same console text that Shadow use.Quote:
no its not the public one ;)
Believe what you want to believe :D
I wrote this project for my private server, including the WR Packets.
Btw. it dont has to stay anywhere it works perfectly :)
€dit:
Server Progress: [Only registered and activated users can see links. Click Here To Register...]
Sadly that fucking coding style still shitty..Quote:
no its not the public one ;)
Believe what you want to believe :D
I wrote this project for my private server, including the WR Packets.
Btw. it dont has to stay anywhere it works perfectly :)
€dit:
Server Progress: [Only registered and activated users can see links. Click Here To Register...]
#define ADR_RemotePointer 0xB0A548
CPlayer* GetPlayerByID(int index)
{
if (index > 32) return NULL;
DWORD dwBase = ADR_RemotePointer;
if (*(DWORD*)(dwBase + (0x4 * index)) != 0)
return (CPlayer*)*(DWORD*)(dwBase + (0x4 * index));
else
return NULL;
}
DWORD REMOTEPOINTER = FindPattern((PBYTE)"\x8B\x04\x8D\x00\x00\x00\x00\xC3", "xxx????x", 3, true);
std::array<pod::player *, 32> &players = *reinterpret_cast<std::array<pod::player *, 32> *>(addr_remote_player_ptr);