maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   WHATSAPP porting , need some help guys ! (https://talk.maemo.org/showthread.php?t=81805)

teamer 2012-01-23 13:08

WHATSAPP porting , need some help guys !
 
Hi all ,
I would like to port whatsapp to n900 , i am an experienced programmer but i have no clue on how to build stuff for the n900 .

so anyone who knows how , instead of leaving me looking for some answers please if you know the answer to the following questions please do answer :

1 - any links/stuff on how to build plugins like the google talk/skype/facebook chat
2 - any information about whatsapp protocol (will do ARP and MITM anyway)
3 - anyone have any phone with whatsapp installed and would like to help ?

Edit :
Found something that might help with ARP & MITM attacks :
http://blog.anidear.com/2011/09/what...windows-7.html

EDIT
Got everything set up , some little info is still needed YOU MIGHT have it even if you're not a programmer/developer
+ a java programmer needed for couple of questions
please visit this post
http://talk.maemo.org/showpost.php?p...4&postcount=34

EDIT :
Got everything set up finally :D will start developing the plugin by the end of the week :D stay tuned !!! [Delayed due to other projects and work and hangover]


Quote:

Originally Posted by rash.m2k (Post 1165933)
New thread specifically for DEVS here:

http://talk.maemo.org/showthread.php?p=1165932


e0x 2012-01-23 13:20

Re: WHATSAPP porting , need some help guys !
 
the IM system of N900 and N9 used telepathy frameware , check this:
http://telepathy.freedesktop.org/wiki/

quipper8 2012-01-23 13:50

Re: WHATSAPP porting , need some help guys !
 
i would be willing.to bet whatsapp is using xmpp. Maybe with a little layer of something.on top

teamer 2012-01-23 13:56

Re: WHATSAPP porting , need some help guys !
 
in the terms of use they prohibit reverse_engineer ! dang

slaapliedje 2012-01-23 13:56

Re: WHATSAPP porting , need some help guys !
 
I just sent them an email, asking for a port, especially since they already support Symbian. How many people have actually tried that, do we know?

slaapliedje

teamer 2012-01-23 13:57

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by slaapliedje (Post 1154396)
I just sent them an email, asking for a port, especially since they already support Symbian. How many people have actually tried that, do we know?

slaapliedje

actually alot . they got a negative reply form whatsapp :(

LaLlamaQueLlama 2012-01-23 14:43

Re: WHATSAPP porting , need some help guys !
 
You could decompile the s40 version to see the whatsapp code

teamer 2012-01-23 14:44

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by LaLlamaQueLlama (Post 1154421)
You could decompile the s40 version to see the whatsapp code

Any links to a "decompiler" ?

cloud596 2012-01-23 15:01

Re: WHATSAPP porting , need some help guys !
 
have you try with android version, try to decompile it with apk tool ,
sol

Mentalist Traceur 2012-01-23 15:14

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by teamer (Post 1154395)
in the terms of use they prohibit reverse_engineer ! dang

Uhhh, screw that?

Unless you're in a country where the laws are abysmally bad, that shouldn't be an issue. In the USA, at least, it's a legal right to reverse engineer for compatibility purposes. Making a compatibility program/plugin for an unsupported platform sounds valid enough to me.

Legalities are a bit trickier if you publish the reverse engineered results in open-source program form, but my unprofessional opinion is that you're still legally in the right to do it... In the event that they decide to be a-holes and try to sue over that, you may well be able to enlist the help of the EFF (Electronic Frontier Foundation), who I believe volunteer their lawyers towards cases of significance towards protecting digital freedoms.

quipper8 2012-01-23 15:22

Re: WHATSAPP porting , need some help guys !
 
I wish they would all just federate, at least for text only messages. I know they probably have their own custom extensions for other media besides text, but underneath it is pretty obvious that they are all using xmpp.

So far we have:

ping chat
groupme
kik
ebuddy xms
whatsapp
imessage
chaton
facebook
google talk
who knows what else




What facebook or gtalk should really do is implement user aliases to mobile number and just take away all the whatsapp and kik and other ones. And yes, federate!


Edit, OH, now I see msn is using some xmpp too:

http://www.liveside.net/2011/09/14/m...mail-calendar/

amrarcher 2012-01-27 20:47

Re: WHATSAPP porting , need some help guys !
 
http://stackoverflow.com/questions/3...om-an-apk-file

i found this it is about extracting code from .apk
hope this may help

teamer 2012-01-28 09:18

Re: WHATSAPP porting , need some help guys !
 
That would be a killer idea

isorn 2012-01-28 10:20

Re: WHATSAPP porting , need some help guys !
 
Java decompiler: jd-gui
Search whatsapp_s40 jar file and decompile it. Now you have the API and "only" need to create a client.

isorn 2012-01-28 10:20

Re: WHATSAPP porting , need some help guys !
 
EDIT: Sorry, duplicated post.

mcdull 2012-01-28 10:33

Re: WHATSAPP porting , need some help guys !
 
I might be wrong, but so far my imperssion is Whatsapp trying to be proprietary and make money from selling the app, unlike other IM, especially those from big guys, are quite open and cooperative.
I kinda feel bad that it got popular but not other more open IM.

All data has to go thru their servers and they are selling the service, I doubt you can make a free app without being blocked by them sooner or later.

teamer 2012-01-28 10:36

Re: WHATSAPP porting , need some help guys !
 
They are charging people for file transferes i think nothing more !

teamer 2012-01-28 10:38

Re: WHATSAPP porting , need some help guys !
 
One more question , any open source IM plugin for N900 ? it would be more easy to edit an existing one than to start from scratch !

teamer 2012-01-28 13:09

Re: WHATSAPP porting , need some help guys !
 
Here's the souce of WA and source of a telepathy module (gabble) . a workaround might get this going through .
authentication / online-offline / send and receive .. sounds pretty easy ... wonder what a mess i would be !

http://www.4shared.com/rar/C3VN9BnV/whatsapp.html

-Tyler- 2012-01-28 13:47

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by mcdull (Post 1156895)
I might be wrong, but so far my imperssion is Whatsapp trying to be proprietary and make money from selling the app, unlike other IM, especially those from big guys, are quite open and cooperative.
I kinda feel bad that it got popular but not other more open IM.

All data has to go thru their servers and they are selling the service, I doubt you can make a free app without being blocked by them sooner or later.

And when you conect to msn with pidgin or any other free software you connect always thru microsoft servers, other thing is the protocol they use is free, in this case xmpp, so you can get access to their network, and microsoft doesn't like this much because they frecuently modify the protocol a little to **** up with people like us :D who donīt want tu use the original msn messenger program.

To see whattsapp protocol you can do with a MITM atack, and then analizing the capture in detail with wireshark, once you have a conversation captured in wireshark it will be in theory easy replicate the protocol.

javispedro 2012-01-28 14:26

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by Mentalist Traceur (Post 1154444)
Unless you're in a country where the laws are abysmally bad, that shouldn't be an issue. In the USA, at least, it's a legal right to reverse engineer for compatibility purposes. Making a compatibility program/plugin for an unsupported platform sounds valid enough to me.

I would not be that sure about that. Here you're interacting with someone's else servers and services (whatsapp's), so they could argue you're "misusing their computers".

don_falcone 2012-01-28 15:24

Re: WHATSAPP porting , need some help guys !
 
Maybe i cut myself out of having access to the newest shiznit / gossip and that, but i refuse to install Whatsapp, EBuddy and related proprietary sh*te. No Facebook dito. Either plain XMPP, Email, SMS/MMS or nothing, so something open & standardized that you can connect to with whatever YOU decide. Even ICQ is somehow broken.

teamer 2012-01-28 15:35

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by -Tyler- (Post 1156967)
And when you conect to msn with pidgin or any other free software you connect always thru microsoft servers, other thing is the protocol they use is free, in this case xmpp, so you can get access to their network, and microsoft doesn't like this much because they frecuently modify the protocol a little to **** up with people like us :D who donīt want tu use the original msn messenger program.

To see whattsapp protocol you can do with a MITM atack, and then analizing the capture in detail with wireshark, once you have a conversation captured in wireshark it will be in theory easy replicate the protocol.

Problem is , while reading the source code of Whatsapp , every sent message is encrypted with a key . didn't have the time to look into the key generation class or the en/decryption algo .

but MITM attacks won't work for sure , but worths the try

DataGhost 2012-01-29 09:17

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by mcdull (Post 1156895)
All data has to go thru their servers and they are selling the service, I doubt you can make a free app without being blocked by them sooner or later.

Well, if we have the source, it's trivial to create a client which replicates the exact behaviour of a legitimate client. That way, they can't see the difference and can't block them. However, I believe that when new clients are released, older versions are blocked from connecting, so that is a problem. Since the client identification is, I believe, largely based on the version string the client sends, this should be easily avoidable but it will cause some downtime for all Maemo users until a new version is released.

Quote:

Originally Posted by -Tyler- (Post 1156967)
To see whattsapp protocol you can do with a MITM atack, and then analizing the capture in detail with wireshark, once you have a conversation captured in wireshark it will be in theory easy replicate the protocol.

It is possible, but reading the source code is easier, I think. Whatsapp uses XMPP as the underlying protocol, yes, but it uses some form of binary XML, the mapping from XML to binary should be in the source somewhere. Maybe a combination of both will yield some good results but I'd still go with the source code.

Quote:

Originally Posted by teamer (Post 1156994)
Problem is , while reading the source code of Whatsapp , every sent message is encrypted with a key . didn't have the time to look into the key generation class or the en/decryption algo .

Are you sure? I sniffed WA traffic from Symbian, Android and Apple devices, all the messages are in the capture in plain text. Maybe you mean that the messages are signed? That could be possible, but encrypted... no. At least not when I checked, which was about two months ago.

Quote:

but MITM attacks won't work for sure , but worths the try
Why wouldn't they work? Granted, it'll be a lot of work to RE the protocol from there but it's doable.


Anyway, I've been at this for a short while and stopped because I did not have more time to work on it. First off, I sniffed some traffic from a Symbian phone (not mine and with permission), I quickly found out that the traffic was not encrypted despite being sent over port 443. I also noticed the authentication procedure was the same as described in the XMPP RFC, so I started there. The only thing I really still required was the authentication password.

I then started out with the Android client, because that's the only thing I can run on my N900. My first efforts were at doing MITM, because it's usually not possible to just decompile code. I sniffed the entire registration procedure (which does happen over HTTPS, I set up a MITM with custom certificates and got the entire thing) in an attempt at figuring out the authentication credentials required to log in. I could not really find them in there and tried everything I could find in the configuration files. Still nothing :(

Then, I decided to try and disassemble the code. I managed to get the bytecode in a human-'readable' format and used JD-gui to make some sense of it. I quickly found out that JD-gui is far from accurate at decompiling code, which was to be expected. Also, I found out that WhatsApp was obfuscated, almost all important classes had their strings encrypted and variable/debug information stripped. With some help of the byte code I managed to decrypt all the strings and after some tedious work I found out where the password came from. (edit: looking at my logs again, it turns out that the 'password' is actually sent to whatsapp but I did not recognize it as such, also due to an error in my version of the authentication algorithm)

Given the amount of work I had to put into this and the fact that I did not have enough time to put into this, I decided to abandon this project, at least for now (then).

Needless to say, I was surprised to find out that the Symbian version is apparently not obfuscated. This will greatly simplify things :) In a few weeks, I will have more time to put into this so I guess I could lend a hand here and there.

teamer 2012-01-29 10:43

Re: WHATSAPP porting , need some help guys !
 
have you checked the source code i posted in earlier messages ?
and yes the key was for signing the text not encryption so MITM would definetly work

and what was the issue with the password ?

and are u building it to work with the telepathy system ? or stand alone ?
if ur doing it within telepathy open a git and add some developers (start with me) we can togetjer set this thing to work and screw those companies who dosen't care for developing stuff for such a gr8 mobile !!!

DataGhost 2012-01-29 18:43

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by teamer (Post 1157294)
have you checked the source code i posted in earlier messages ?

Yes, that's why I saw that it wasn't obfuscated.

Quote:

and are u building it to work with the telepathy system ? or stand alone ?
if ur doing it within telepathy open a git and add some developers (start with me) we can togetjer set this thing to work and screw those companies who dosen't care for developing stuff for such a gr8 mobile !!!
I'm not building anything yet, as I said I stopped working on it due to a lack of time and because the source was obfuscated. In a couple of weeks, when I have some spare time, I'll probably start (if nobody did so) or help.

teamer 2012-01-29 18:46

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by DataGhost (Post 1157484)
Yes, that's why I saw that it wasn't obfuscated.


I'm not building anything yet, as I said I stopped working on it due to a lack of time and because the source was obfuscated. In a couple of weeks, when I have some spare time, I'll probably start (if nobody did so) or help.

Yeah same here i have 3 projects going on already !

teamer 2012-01-30 11:49

Re: WHATSAPP porting , need some help guys !
 
Ok , anyone expert in Java ?
i got the password generation algo in WA ;)

teamer 2012-01-30 13:26

Re: WHATSAPP porting , need some help guys !
 
Ok , got everything figured out :D probably will start developing for n900-whatsapp this night :D wish me luck .

what do you all think , normal app or telepathy ???

the ones who wants it telepathy (i do) , to make things faster please someone search for a source code for a telepathy client (gtalk would be perfect) or just an empty template code !

MohammadAG 2012-01-30 13:51

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by teamer (Post 1157861)
Ok , got everything figured out :D probably will start developing for n900-whatsapp this night :D wish me luck .

what do you all think , normal app or telepathy ???

the ones who wants it telepathy (i do) , to make things faster please someone search for a source code for a telepathy client (gtalk would be perfect) or just an empty template code !

Although I'd like it to be telepathy too, WhatsApp has features that the conversations UI won't support, examples are file sending and last offline features, as well as sending location etc.

If you need help with the client, ping me.

teamer 2012-01-31 08:19

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by DataGhost (Post 1157484)
Yes, that's why I saw that it wasn't obfuscated.


I'm not building anything yet, as I said I stopped working on it due to a lack of time and because the source was obfuscated. In a couple of weeks, when I have some spare time, I'll probably start (if nobody did so) or help.

Have u ever worked with telepathy ? or know anything about it ? i don't know where to start !

Jundillah 2012-01-31 13:54

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by teamer (Post 1158240)
Have u ever worked with telepathy ? or know anything about it ? i don't know where to start !

Your Java developer has arrived, whatsup? (pun definitely intended)

:)

teamer 2012-01-31 14:19

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by Jundillah (Post 1158399)
Your Java developer has arrived, whatsup? (pun definitely intended)

:)

Finally hehe
here's the source code for whatsapp built in java :
http://www.4shared.com/rar/C3VN9BnV/whatsapp.html
(along with some other files)
things needed to build whatsapp :
- getting the username
- knowing how the password is generated (i think i figured that out in the Utility class something about reversing the imie)
- the registration request (request for sms depending on phone# for user/password)
- the verification request (what is actually sent back after the verification)

extra : file transfers and groups

teamer 2012-02-02 09:56

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by Jundillah (Post 1158399)
Your Java developer has arrived, whatsup? (pun definitely intended)

:)

got everythig dug up but didn't understand this as i am not java expert :

in class com.whatapp.client.PhoneRegSMS
what those
import javax.wireless.messaging.Message;
import javax.wireless.messaging.MessageConnection;
import javax.wireless.messaging.TextMessage;
really do ?
specially the send and receive
do they make some kind of TCP connection ?
or just send and receive SMS ?

FOR PUBLIC :
anyone have any WA verification SMS ????????
the pidigin plugin is being built right now !!!!!! need this info to complete it !
its WORKING !!!
we're gonna have whatsap for N900 SOOOOOON

don_falcone 2012-02-02 10:26

Re: WHATSAPP porting , need some help guys !
 
SCNR,

http://t4ak.roblox.com/14beafb2d3c707a873b8dab1b9f35e3f

BertvanDorp 2012-02-02 10:56

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by teamer (Post 1159324)
got everythig dug up but didn't understand this as i am not java expert :

in class com.whatapp.client.PhoneRegSMS
what those
import javax.wireless.messaging.Message;
import javax.wireless.messaging.MessageConnection;
import javax.wireless.messaging.TextMessage;
really do ?
specially the send and receive
do they make some kind of TCP connection ?
or just send and receive SMS ?

FOR PUBLIC :
anyone have any WA verification SMS ????????
the pidigin plugin is being built right now !!!!!! need this info to complete it !
its WORKING !!!
we're gonna have whatsap for N900 SOOOOOON

Can't really express how excited I am for this news!! Keep up the good work! There's a lot of work involved in really getting it together so it works for a larger user crowd, maintaining, etc.. Will you publish the code, so others can extend and improve?

teamer 2012-02-02 10:58

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by BertvanDorp (Post 1159348)
Can't really express how excited I am for this news!! Keep up the good work! There's a lot of work involved in really getting it together so it works for a larger user crowd, maintaining, etc.. Will you publish the code, so others can extend and improve?

Yes sure ill upload them to github once i finish writing the registration steps , but i can't start writing that unless i get a sample of the verification SMS or an explanation of what the java classes listed above do !

abufaisal.o 2012-02-02 11:31

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by teamer (Post 1159324)
in class com.whatapp.client.PhoneRegSMS
what those
import javax.wireless.messaging.Message;
import javax.wireless.messaging.MessageConnection;
import javax.wireless.messaging.TextMessage;
really do ?
specially the send and receive
do they make some kind of TCP connection ?
or just send and receive SMS ?

see the following site which explain these APIs
http://developers.sun.com/mobility/midp/articles/wma/

tamzak 2012-02-02 13:20

Re: WHATSAPP porting , need some help guys !
 
I too am really excited about this!

Really really wish i could help you, but my JAVA skills are VERY limited :D

Just started learning this language, so i'm affraid i wouldn't be much of a help.

I wish you the best of luck with this!

teamer 2012-02-02 13:23

Re: WHATSAPP porting , need some help guys !
 
Quote:

Originally Posted by tamzak (Post 1159418)
I too am really excited about this!

Really really wish i could help you, but my JAVA skills are VERY limited :D

Just started learning this language, so i'm affraid i wouldn't be much of a help.

I wish you the best of luck with this!

if you know good java guys and lead them here that would be a help :)


All times are GMT. The time now is 21:05.

vBulletin® Version 3.8.8