![]() |
[WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Thought I'd start a new thread in the dev section for people to post stuff specifically related to porting whatsapp, hopefully I can and other devs can find things much easier if it's in a single dev only thread.
So to start of with Whatsapp uses XMPP according to wikipedia: http://en.wikipedia.org/wiki/WhatsApp So this google code will probably help with that; http://code.google.com/p/qxmpp/ Whats different about whats app is that it allows >1 person to be involved in a conversation, not sure whether XMPP supports this (this shows im not an XMPP expert). The following post in the original thread is very helpful, credit to ColaCheater very very useful post: Quote:
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
I have successfully decompiled the source for the whatsapp APK.
And can upload this upon request for anyone that wants to save themselves some hassle. I am a Java dev, but currently working on some (>1) QML/Qt based apps for the Nokia N9 plus I have a full time job. Regardless I will try to help as much as I can. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Please PM me the link to the APK, would like to look into it and possibly assist if I can. :)
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
I'm uploading now,
the file contains two things: a) smali decompiled code, this is purely so you can see the XML files. b) Actual source from the WhatsApp APK, this is a zip file inside the WhatsApp-smali-decompiled and has src in the filename. Upload link: http://www.mediafire.com/?ssc3awthw99kl9s |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Turns out the framework apk i was using was for android eclair.
I has decompiled it but not quite correctly. Seems to get confused with the object type of some variables. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Let me quote some useful info from the previous thread for anyone nt willing to navigate through pages and pages of "thank you"s and fanboys complaining.
Quote:
Quote:
I *might* be able to help in future when I finish my current proyect. If there's any more python dev here, patching stuff from telepathy-butterfly and possibly xmpppy might be a cool idea. Whatever you do, don't use some really not-popular language. :) On any case, I've given this some though, and I think we might use some small app to retreive password/etc, and then store it into a file. This means the telepathy plugin can be separate, and requires *no separate gui*. It'd be just a backend, and therefor, reusable in innumerable platforms. Oh, and XMPP *does* support multiple persons in a single conversation. Google Talk is an XMPP service, and most things you can do there, are standard XMPP. For multi-people chat, a "chat room" is created temprarily. Read, as a minimum, the wikipedia page for some info on XMPP. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
I'm a python dev, I've implemented registration and now I'm trying to get the login part to work.
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
would icedrebot project help to run the android parts ?
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
wait for chrome mobile ported, :D
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Eventhough I'm still waiting for teamer to write what he exactly knows about the protocol it's great to see other people also working on it.
For my part I wrote in my post about registration everything I know so I can't give you much more information, the only thing I can do is looking for some specific actions in the code, e.g. how an request is build or something like this. Quote:
Oh and maybe it would be better not to share the "original" WhatsApp code here, just the things we found out about how it works. I don't know the legal positon but sharing code that is (c) by WhatsApp isn't that good I would say :rolleyes: The last thing I think maybe would be good to know: Is somebody having a phone with an official WhatsApp version to do some sniffing? This may also would be helpful, especally to get to know i.e. what information the mobile phone really sends u.s.w. -> A Nokia S40 Phone (which supports WhatsApp) would be the best I think because at least that would be the source where most of us are getting their information from?! |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Thought I'd give you an update... nothing much happened since my last post, my work is progressing slowly as I do have some spare time, but only some. Also, I'll be gone the entire next week so don't expect anything happening then.
For anyone else who wants to have a crack at this: go ahead but unfortunately I can't/won't share the information I have because of the simple fact that it's all in my head or scrambled around in text files and putting it together in something coherent and usable will take too much time. Anyone experienced enough to reverse engineer WA won't have too much trouble gathering this information anyway so I don't expect that to be a problem. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
I do have an official whatsapp on my android device, not really sure how I will sniff the data on the whatsapp?
Setup up a wireless network using my laptop as a gateway and sniff the traffic that way? i do have a usb wireless dongle so could do that once I am able to setup the routing tables. The android code is pretty much the same as s40 I would assume, but I couldn't get the s40 app thats why I got the android one. Probably not a good idea to share code from whats app - it's a grey area but i'm just saving people the hassle of doing it themselves. What we really need is a working and compilable version of android whats app currently mine doesn't compile! We also need a place to share ideas and put some of this code (not in a public place ofcourse) - that would help this project along immensely! Quote:
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
And just a small Update: I noticed that I think my S40-Version of WhatsApp isn't the newest. The newest MIDlet-Version should be 2.3.9 and mine is (as I wrote) 2.1.0 when I saw it correctly... - Does anybody with the S40-Code have a newer version? Update: The newest version actually is 2.3.12 and I now was able to download this Version. Isn't that hard, you just have to look what the newest Version is :D Update 2: I really should look at things before posting... >.< - The 2.3.12 now is obfuscated so I think it doesn't help that much :rolleyes: |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Old versions are no longer on the server anymore!
Need to grab them from other places. Working on that now. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
i don't think we need any newer version
for now i still did not understand what is required to build a plugin like (like skype or gtalk ones) for n900 ? empathy ? telepathy ? pidigin ? what exactly ????????????? for now we have the login and registration procedures that works (yes !) lets implement them into "something" as a start , then after , implementing xmpp to that all won't be hard . 2-3 days of development would set that all . but the problem is WHAT TO DEVELOP ? get me an answer for that ! |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
The alternative would be to write an Pidgin plugin that then could be used in telepathy/N900 via a plugin for telepathy(?!) |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
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)
Porting WhatsApp is one thing, but the reason people use it is because of the above features, we need to make sure they are done otherwise it not really going to help many people. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
The N900 i.e. supports file transfers for xampp, IM-Sessions with more than 1 person also is avaiable in xampp (don't know if the N900 offers this in the xampp Plugin), brodcast messages just are .xyz sound files send i think and so on. By this I would say yes, it is possible to do. And even when we wouldn't be able to integrate it 100% into the n900 conversations, I think it still would be possible to create a program for handling this special things and letting the "normal" conversation work via the N900 conversations... |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Could some download the whatsapp from here and also save them?
http://www.filecrop.com/search.php?w...inc&order=size |
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. |
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. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
I belive the avahi/bonjour plugin in particular, is a pidgin plugin, being loaded this way. Quote:
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 |
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. |
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(); 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 Code:
00:00:53.689500 : python_appui.cpp(807) : HandleForegroundEventL - aForeground: 0 That's all for now, more to come soon (I hope :rolleyes: ) |
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. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
What version ?
|
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
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 |
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) |
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) :) |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
There's still nothing usable, it's all dev stuff atm.
There's PHP, Java and Python code (as far as I know) between us. There's no application, yet. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
@hobarrera: I understood "broadcast" so that you can send voice-messages but maybe thats my mistake :rolleyes: (I didn't use WhatsApp anytime, I just saw it on other phones so I don't exactly know what it actually offers in the clients)
Regarding the File-Transfers: You can do File-Transfers i.e. a picture by viewing it in the gallery and then using the share-option "Share via IM". It then says in my case "only aviable with Jabber Accounts" because I don't have any activated on my phone ;) But I actually wounder rhight now why it is in english even though my phone is set to german and everything else is in german. Maybe I have an program installed that I don't know right now that enables this? @OzJD: Why do you mean the Code you need to register isn't random? - If I'm not confused and we mean the same code you get this Code via an API-Call and when you call for it more than one time with the same number/imei you get different codes (as far as I now atm) @tgalal: Can you verfiy that the phone-number you used to register the account is found as registered with an official WhatsApp Client? That was a problem I had when registering the way I described: The registered Account wasn't found by an official client. Maybe you need to be logged in to get found? But great to see that you are now able to make a connection to the server! |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
The link that you provided to get the whatsapp username didn't work - not for UK anyway, I put in country code GB and my mobile number and imei and just keeps erroring.
I also tried MCC for UK (234 and 235) also didn't work. EDIT::::: Country code is NOT MCC but rather 44 (for UK). |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Hi guys,
I am a new member here and found this thread while searching for WhatsApp help. I am trying to create a client in PHP, I've got the code by de-compiling the s40 version. I also configured a sniffer by using MITM attack. I almost understood how WhatsApp connects but I am struggling in getting PHP to connect to the xmpp server. It would be really great if anyone can help me by giving me some code snippets or some hints. I also can help you based on your needs as much as I can. Thanks |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
or, we can run a webpage that run the code to login and chat online over any browser on any mobile phone. Please if anyone has the php or java code, send it to me to make some tests. my e-mail : johnnydaou@hotmail.com |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
It worked for me and I got my username @s.whatsapp.net with the password. My country code is 961. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
Whenever I have attempted to use it, it always provides me with the same code - dependant upon number only (MNC, MCC, etc. can be changed and you still get the same code). Can you re-check for me please? Quote:
It's great to see some traction in the thread. Development is going well :-) If anyone that's doing development is on Google+, add me on the link found on previous pages and I'll create and share a circle with all of us. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Yep putting in 44 (no plus), worked for me just fine and got my whats app username and password.
I did try to wireshark the whatsapp traffic to no avail. FYI I used hostap (linux app) to setup my laptop as a wireless hotspot and connect the android phone to it. Didn't pick up any traffic though for some reason - didn't spend much time on it though. How are you looking at whatsapp traffic? EDIT::: Just seen I only need a router to sniff traffic. |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
is it the same in settings-->general-->about-->IMEI? |
Re: [WIP] Porting Whatsapp to Meego/Maemo (N9, N900)
Quote:
In the post before the linked teamer says something about that he would have the/an algorithm. Is this correct teamer? But even when the code is calculated, wouldn't it may be better to request it from the server? Because the original client seems to do it also... |
All times are GMT. The time now is 16:22. |
vBulletin® Version 3.8.8