maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [WIP] Porting Whatsapp to Meego/Maemo (N9, N900) (https://talk.maemo.org/showthread.php?t=82384)

OzJD 2012-02-18 15:41

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
The problem you guys are going to have is that the code you are in possession of is way out of date.
It's easy enough to sniff out the new data connections if you use a Man in the middle attack.

I'm still not sure how the activation code is done; The rest I am sure of.
I can successfully get both username and password by providing Phone Number and IMEI.

It's all really simple, and I don't want to say too much on a public here atm, the only thing I can't work out is the activation code.

I'm considering building a web client soon.

Hint for future... don't use iq.php to get a list of available contacts; the current official clients don't use this anymore. It will be obvious to WhatsApp staff that you've gained access.

I do know for sure that the 3 digit verification code can be calculated by NUMBER + NETWORK only. It's not a random number.


If you want more info, circle me on Google+ (and let me know who you are, and that you're a Maemo user)
https://plus.google.com/u/0/105182152373033008678/


Edit: Verification code does not rely on MNC.
Edit2: Verification code does not rely on MCC.
This means it only requires Country Code & Phone Number to be calculated.

What's really annoying...
I thought I got lucky when adding the digits of my MCC + MNC + CC, then multiplying it by my local number, the last 3 digits were my verification code.

OzJD 2012-02-18 17:27

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
You can find your WhatsApp username & password easily using this tool:
http://www.jeltel.com.au/whatsapp/password.php

It will only show WhatsApp username and password AFTER entering a correct phone number and IMEI.

hobarrera 2012-02-18 19:36

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
Quote:

Originally Posted by ColaCheater (Post 1166542)
The alternative would be to write an Pidgin plugin that then could be used in telepathy/N900 via a plugin for telepathy(?!)

Yes, some protocols are already implemented this way in the N900.
I belive the avahi/bonjour plugin in particular, is a pidgin plugin, being loaded this way.

Quote:

Originally Posted by rash.m2k (Post 1166548)
Say we did create a plugin for something (one of those frameworks mentioned). Would we still be able to send files, have >1 party IM sessions, be able to send broadcast messages? (I have zero knowledge of this)

Multi-person IM sessions are supported on XMPP, but I can't remember if I've ever had one on the N900.
File sending is missing from the N900 chat UI.

I don't know what you mean by broadcast, but if it means "sending to everyone", there's probably some specific account that you send the message to (ie: everyone@s.whatsapp.com), and it gets re-sent to everyone by the WA server.
I'm just guessing though, this will probably be verifiable by sniffing :P

OzJD 2012-02-19 03:30

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
CONNECT_BINARY_DOMAIN_ASCII = "bin-short.whatsapp.net";
CHAT_BINARY_PORT = 5222;
PRODUCTION_CHAT_XMPP_DOMAIN = "s.whatsapp.net";
CHAT_XMPP_PORT = 443;
URL_CRASHLOG_UPLOAD = "https://crashlog.whatsapp.net/upload.php";
URL_MMS_UPLOAD = "https://mms.whatsapp.net/client/iphone/upload.php";

?from=<user>&to=<remote_jid>
URL_QUERY_STATUS = "https://sro.whatsapp.net/client/iphone/bbq.php";
?v=3&cc=<countrycode>&me=<phonenumber>&u[]=<contactnumber1>&u[]=<contactnumber2>...&bbfr=1
Note: only use bbft on first use.
URL_UPDATE_MY_STATUS = "https://s.whatsapp.net/client/iphone/u.php";
?v=1&cc=<countrycode>&me=<phonenumber>&clear=1&s=< newStatus>
Note: Only use either 'clear' or 's' paremeters, not both.
URL_OTA_INSTALL = "http://www.whatsapp.com/s40/WhatsApp.jad";
PRODUCTION_CHAT_XMPP_DOMAIN = "s.whatsapp.net";


Just sticking this here. I'm sure it will help someone whoi isn't up to date on the HTTP stuff.

tgalal 2012-02-19 11:55

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
Updates:

I'm putting much dedication into this and hopefully will come out with something good soon.

I managed to compile FunXMPP.java in the decompiled version of whatsapp which greatly helped in tracing and understanding the code. I'm creating the app using python and BIG THANKS to the very informative guide posted by ColaCheater. I created the 3 functions concerned with registration (obtaining reg code from server, registering the whatsapp account, and checking account existence). That was easy to implement.

And then moving on to login, things turned out a bit complex, I rewrote the whatsapp login functions in python:

Code:

out.streamStart(connection.domain, connection.resource);  sendFeatures();
sendAuth();
in.streamStart();
String challengeData = readFeaturesAndChallenge(); sendResponse(challengeData);
readSuccess();

which is working great and I'm able to login now.

An interesting thing to point out too is that when I looked at the whatsapp logs stored on my phone (the original whatsapp and not the one I'm creating), the data appears to have been logged from python code! There are traces of Whatsapp.py, xmpp.py, chat.py and others:
Code:

00:00:05.005000 : appviews.py(1017) : chats/relative-times-update
00:00:12.663375 : chat.py(918) : chat/send-delivery-report

But there is also:
Code:

00:00:53.689500 : python_appui.cpp(807) : HandleForegroundEventL - aForeground: 0
which suggests that whatsapp for S60 3rd edition, 5th edition, Symbian^3 and Symbian Anna is written mainly in python (not Symbian C++ as many believed), and only embedded in a Symbian C++ code. This guide explains how to do that.

That's all for now, more to come soon (I hope :rolleyes: )

rash.m2k 2012-02-19 12:02

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
Excellent work tgalal, I have managed too gather many whatsapp versions including blackberry, android, symbian s60, s40.

PM me if you need any of these.

Edit: Wish I had the free time to spend on this. Unfortunately I don't have that much free time.

teamer 2012-02-19 12:39

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
What version ?

rash.m2k 2012-02-19 12:42

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
Quote:

Originally Posted by teamer (Post 1166892)
What version ?

I have the following versions of whatsapp the reason for this is that the latest versions are obfuscated, unlike older versions;

android/WhatsApp2.3948-cht.apk
android/com.whatsapp-2.apk
android/WhatsApp_v2.6.4401-cht.apk
android/WhatsApp_v2.6.4531-cht.apk
android/WhatsApp_Messenger_2.7.382.apk
android/WhatsApp_Messenger_2.7.950.apk
android/WhatsApp_v2.6.2200-cht.apk
android/whatsapp_Ver_2.6.6459.apk

s40/WhatsApp_2_0_7.jar
s40/WhatsApp v2.2.33(15234) S40 by DeaDKiSs.jar
s40/WhatsApp_2_3_12.jar
s40/WhatsApp_2_3_9.jar

blackberry
blackberry/WhatsApp5.0.rar
blackberry/WhatsApp47.rar
blackberry/WhatsApp46.rar
blackberry/WhatsApp45.rar
blackberry/Whatsapp-248868.rar
blackberry/WhatsApp.All.BB.krak.rar

s60/WhatsApp_S60_3_1_1_7_22.sisx
s60/WhatsApp_2_2_27.sis
s60/WhatsApp_2_0_6.sis
s60/WhatsApp_2_6_20.sis
s60/WhatsApp_2_6_22.sis
s60/WhatsApp_2_6_7 on E.sis

wp7/Whtspp_v1_1.zip
wp7/.directory
wp7/Whtspp_v1.0.1.zip

OzJD 2012-02-19 13:23

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
I've been chatting alot with tgalal alot over on Google+/Google Talk.
I'm creating a PHP client for registration with proper password support etc.

I've been using Whatsapp v2.7.3581 on Android/4.0.2 (Samsung Galaxy Nexus) as a base.
I've got decompiled Nokia & Android versions, but I'm primarily working on it based on packet sniffing (with MITM attack, as it's SSL)

Any client that I or tgalal release will support any password, as well as IMEI.

This *should* allow us to login to whatsapp with more than 1 device, at the same time (untested as yet)

johnnygdaou 2012-02-19 14:29

Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
 
Can't we have a chat only version for testing now ???
(Which means only to send text between contacts and it would be a text-only version) :)


All times are GMT. The time now is 02:37.

vBulletin® Version 3.8.8