|
|
@ -2752,7 +2752,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// send login + crypted password + client app and cp=1 (as crypted password)
|
|
|
|
// send login + crypted password + client app and cp=2 (as crypted password)
|
|
|
|
if(!HttpClient.connectToLogin())
|
|
|
|
if(!HttpClient.connectToLogin())
|
|
|
|
return "Can't connect (error code 63)";
|
|
|
|
return "Can't connect (error code 63)";
|
|
|
|
|
|
|
|
|
|
|
@ -2763,7 +2763,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
// R2 login sequence
|
|
|
|
// R2 login sequence
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
|
|
|
|
|
|
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=1" + "&lg=" + ClientCfg.LanguageCode))
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=2" + "&lg=" + ClientCfg.LanguageCode))
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
|
|
|
|
|
|
|
|
// the response should contains the result code and the cookie value
|
|
|
|
// the response should contains the result code and the cookie value
|
|
|
@ -2843,7 +2843,7 @@ string checkLogin(const string &login, const string &password, const string &cli
|
|
|
|
// standard ryzom login sequence
|
|
|
|
// standard ryzom login sequence
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(password, Salt);
|
|
|
|
|
|
|
|
|
|
|
|
if(!HttpClient.sendGet(url + "?login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=1"))
|
|
|
|
if(!HttpClient.sendGet(url + "?login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=2"))
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
return "Can't send (error code 2)";
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
if(!send(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?login="+login+"&password="+password+"&clientApplication="+clientApp))
|
|
|
|
if(!send(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?login="+login+"&password="+password+"&clientApplication="+clientApp))
|
|
|
@ -2947,12 +2947,12 @@ string selectShard(uint32 shardId, string &cookie, string &addr)
|
|
|
|
if(LoginPassword.empty()) return "Empty Password (error code 9)";
|
|
|
|
if(LoginPassword.empty()) return "Empty Password (error code 9)";
|
|
|
|
if(ClientApp.empty()) return "Empty Client Application (error code 10)";
|
|
|
|
if(ClientApp.empty()) return "Empty Client Application (error code 10)";
|
|
|
|
|
|
|
|
|
|
|
|
// send login + crypted password + client app and cp=1 (as crypted password)
|
|
|
|
// send login + crypted password + client app and cp=2 (as crypted password)
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(LoginPassword, Salt);
|
|
|
|
std::string cryptedPassword = CCrypt::crypt(LoginPassword, Salt);
|
|
|
|
|
|
|
|
|
|
|
|
std::string url = ClientCfg.ConfigFile.getVar("StartupHost").asString() + ClientCfg.ConfigFile.getVar("StartupPage").asString();
|
|
|
|
std::string url = ClientCfg.ConfigFile.getVar("StartupHost").asString() + ClientCfg.ConfigFile.getVar("StartupPage").asString();
|
|
|
|
|
|
|
|
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&shardid=" + toString(shardId) + "&login=" + LoginLogin + "&password=" + cryptedPassword + "&clientApplication=" + ClientApp + "&cp=1"))
|
|
|
|
if(!HttpClient.sendGet(url + "?cmd=login&shardid=" + toString(shardId) + "&login=" + LoginLogin + "&password=" + cryptedPassword + "&clientApplication=" + ClientApp + "&cp=2"))
|
|
|
|
return "Can't send (error code 11)";
|
|
|
|
return "Can't send (error code 11)";
|
|
|
|
|
|
|
|
|
|
|
|
string res;
|
|
|
|
string res;
|
|
|
|