diff options
-rwxr-xr-x | protocols/AimOscar/src/connection.cpp | 15 | ||||
-rwxr-xr-x | protocols/AimOscar/src/stdafx.h | 6 |
2 files changed, 15 insertions, 6 deletions
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index 1a9b347902..76338e62cb 100755 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -200,7 +200,7 @@ void fill_session_url(CMStringA &buf, CMStringA &token, CMStringA &secret, time_ */
CMStringA query_string;
- query_string.Format("a=%s&distId=%d&f=xml&k=%s&ts=%llu&useTLS=%d", token, AIM_DEFAULT_DISTID, AIM_DEFAULT_CLIENT_KEY, hosttime, (int)encryption);
+ query_string.Format("a=%s&distId=%s&f=xml&k=%s&ts=%llu&useTLS=%d", token, AIM_DEFAULT_DISTID, AIM_DEFAULT_CLIENT_KEY, hosttime, (int)encryption);
BYTE session_key[MIR_SHA256_HASH_SIZE], signature[MIR_SHA256_HASH_SIZE];
mir_hmac_sha256(session_key, (BYTE*)password, mir_strlen(password), (BYTE*)secret.GetString(), secret.GetLength());
@@ -301,10 +301,19 @@ void CAimProto::aim_connection_clientlogin(void) // reuse NETLIBHTTPREQUEST
req.requestType = REQUEST_GET;
req.pData = NULL;
+ req.flags |= NLHRF_MANUALHOST;
+ //req.flags &= ~(NLHRF_GENERATEHOST | NLHRF_SMARTREMOVEHOST | NLHRF_REMOVEHOST);
req.dataLength = 0;
- req.headersCount = 0; //additional headers disabled
+ req.headersCount = 4; //additional headers disabled
req.szUrl = url.GetBuffer();
- resp = CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
+ {
+ NETLIBHTTPHEADER headers2[] = {
+ { "Host", "api.oscar.aol.com" },
+ };
+ req.headers = headers2;
+
+ resp = CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
+ }
if (!resp || !resp->dataLength) {
// TODO: handle error
diff --git a/protocols/AimOscar/src/stdafx.h b/protocols/AimOscar/src/stdafx.h index 8adc98a32f..59d7044297 100755 --- a/protocols/AimOscar/src/stdafx.h +++ b/protocols/AimOscar/src/stdafx.h @@ -169,13 +169,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define AIM_LOGIN_URL "https://api.screenname.aol.com/auth/clientLogin"
#define AIM_SESSION_URL "https://api.oscar.aol.com/aim/startOSCARSession"
#define AIM_DEFAULT_CLIENT_KEY "ma15d7JTxbmVG-RP" //this one from libpurple, i am not able to create one, sorry guys
-#define AIM_DEFAULT_DISTID 0x00000611 //this one from libpurple, i am not able to create one, sorry guys
+#define AIM_DEFAULT_DISTID "1553" //this one from libpurple, i am not able to create one, sorry guys
+
+
#define AIM_DEFAULT_SERVER "login.oscar.aol.com"
-//#define AIM_DEFAULT_SERVER_SSL "slogin.oscar.aol.com"
#define AIM_PROXY_SERVER "ars.oscar.aol.com"
#define AIM_DEFAULT_PORT 5190
-//#define AIM_DEFAULT_SSL_PORT 5190
//Some Defaults for various things
#define DEFAULT_KEEPALIVE_TIMER 39 // secs
|