-
-
Save dequis/77b478f35f93f64ac640 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python | |
""" | |
MSN ApplicationId patcher for pidgin/bitlbee/whatever | |
(because you're too lazy to rebuild the whole thing.) | |
Usage examples: | |
python patch.py /usr/sbin/bitlbee | |
python patch.py /usr/lib/purple-2/libmsn.so | |
It will output the modified file to the current directory. | |
Backup the original file and replace it with the new version. | |
If you're lucky, it will work. | |
If not, don't be lazy and rebuild it. | |
""" | |
import os | |
import sys | |
import mmap | |
import shutil | |
WLM_2008_ID = b"CFE80F9D-180F-4399-82AB-413F33A1FA11" # blocked | |
WLM_2009_ID = b"AAD9B99B-58E6-4F23-B975-D9EC1F9EC24A" # blocked | |
WLM_2012_ID = b"484AAC02-7F59-41B7-9601-772045DCC569" # working, may be buggy | |
SKYPE_ID = b"F6D2794D-501F-443A-ADBE-8F1490FF30FD" # working, may be buggy | |
# "buggy" means you may show up as offline to others - test talking with a contact! | |
## you can try switching these around! | |
OLD_ID = WLM_2008_ID | |
NEW_ID = SKYPE_ID | |
## examples (remove # from the relevant lines) | |
## use the WLM 2012 key instead (may work better for you) | |
#OLD_ID = WLM_2008_ID | |
#NEW_ID = WLM_2012_ID | |
## if you want to patch an already patched binary to use 2012 instead of 2009: | |
#OLD_ID = WLM_2009_ID | |
#NEW_ID = WLM_2012_ID | |
def main(): | |
if len(sys.argv) < 2: | |
print(__doc__.strip()) | |
return | |
filename = sys.argv[1] | |
out_filename = os.path.abspath(os.path.basename(filename) + ".out") | |
shutil.copy(filename, out_filename) | |
print("Writing to " + out_filename) | |
fd = os.open(out_filename, os.O_RDWR | getattr(os, 'O_BINARY', 0)) | |
map = mmap.mmap(fd, 0, access=mmap.ACCESS_WRITE) | |
changes = 0 | |
offset = map.find(OLD_ID) | |
while offset != -1: | |
print("Found old ID at offset: %d (0x%x)" % (offset, offset)) | |
map.seek(offset) | |
map.write(NEW_ID) | |
changes += 1 | |
offset = map.find(OLD_ID) | |
if not changes: | |
print("Not found") | |
else: | |
print("%s IDs changed" % changes) | |
if __name__ == '__main__': | |
main() |
Worked for Adium 1.5.10 on OS X 10.9.3
Unfortunately, as some others have said, I don't seem to get messages from other users, but they do see my messages.
Potential workaround for the issues of showing offline to others / one-way chat.
- Sign in to http://outlook.com with your msn account details (doesn't matter if it's not an outlook/hotmail email address)
- Let the webchat connect
- Connect with bitlbee/pidgin/adium/whatever
- Close outlook.com
- You should be able to use it normally now.
New workaround idea, for pidgin/adium/libpurple users only, install msn-pecan, which uses an even older version of the protocol (MSNP12) which handles contact lists in a different, much simpler way.
To install MSN Pecan on Ubuntu I can do:
sudo apt-get install msn-pecan
Does anyone know of a build of the Adium plugin...? The project website doesn't seem to supply a recent build...
Pecan worked for me (for now). Pidgin 2.10.10 on windows 7.
Thanks!
Could really use an Adium version too. Tried to install the patch on my machine via terminal but it still won't let me log in.
If anyone could direct mac users such as myself on how to install MSN pecan it would be greatly appreciated.
Following @zmx instructions and copying the patch's output file to /Applications/Adium.app/Contents/Frameworks/libpurple.framework/Versions/Current and replace libpurple worked for Adium (1.5.10) on OSX.
Thanks, mate!! Worked like a charm on Ubuntu with my pidgin 2.10.3.
Bitlbee users: bzr revision 1064 (diff) includes fixes for the problem of showing offline. For users of the public server, testing.bitlbee.org
is already updated to this revision.
These should arrive to pidgin's hg soon, and we'll have to do something about distributing those because a patch won't cut it this time.
Thanks, worked perfectly well with patching libpurple (/usr/lib/purple-2/libmsn.so) that pidgin uses.
Debian Wheezy (7.6), libpurple 2.10.9, pidgin 2.10.9.
My steps were:
stop pidgin
$ mkdir /tmp/pidgin-patch
$ cd /tmp/pidgin-patch
$ wget https://gist.githubusercontent.com/dequis/77b478f35f93f64ac640/raw/164ea64b8db31f1d6d2aecb9b4a20e9b84b29770/patch.py
$ chmod +x patch.py
$ sudo cp /usr/lib/purple-2/libmsn.so /usr/lib/purple-2/libmsn.so.orig
$ sudo cp /usr/lib/purple-2/libmsn.so .
$ ./patch.py libmsn.so
(the output was:
Writing to /home/vl/tmp/pidgin/libmsn.so.out
Found old ID at offset: 260506 (0x3f99a)
Found old ID at offset: 262293 (0x40095)
Found old ID at offset: 263445 (0x40515)
Found old ID at offset: 265053 (0x40b5d)
Found old ID at offset: 266165 (0x40fb5)
Found old ID at offset: 267301 (0x41425)
Found old ID at offset: 268517 (0x418e5)
Found old ID at offset: 269965 (0x41e8d)
Found old ID at offset: 271125 (0x42315)
Found old ID at offset: 272421 (0x42825)
Found old ID at offset: 273709 (0x42d2d)
Found old ID at offset: 274869 (0x431b5)
Found old ID at offset: 276197 (0x436e5)
Found old ID at offset: 277221 (0x43ae5)
14 IDs changed)
$ sudo cp libmsn.so.out /usr/lib/purple-2/libmsn.so
start pidgin
Pidgin/libpurple users: 2.10.11 was released yesterday, includes fixes for the problem of showing offline. Upgrade to it instead of using this patch!
Getting "connection refused" this morning with Pidgin 2.10.11 (Windows 7).
Getting "connection refused" this morning too. Coworkers are getting the same thing. 2.10.10 (patched) and 2.10.11.
MSN-pecan is also giving "connection refused". Maybe they finally shut it down.
This patch worked for me Win 7 with 2.10.10 for a bit. Now I've got the issue again "connection refused" to MSN. Upgraded to 2.10.11 and still having it.
Does anyone know if pidgin devs are still aware of the issue and if there is a tracking bug for it?
UPDATE: They are aware on their IRC channel.
Directs you to:
http://ismsndeadyet.com/
Seems to work by enabling HTTP method in advanced for account.
bengalih's recommendation worked for me. HTTP method works again.
I can also confirm that this latest change (select Connect via HTTP under Options) re-enables for my patched version of Adium (https://gist.github.com/dequis/77b478f35f93f64ac640#comment-1337726).
HTTP method - works for me. (australia)
I can't get this to work for pidgin 2.10.10 on windows 7. I have followed the instructions, run python and the patch and it still doesn't not connect my msn accounts. I am not sure where to put the skype id, I have tried putting it in the 2009 slot and in the skype id slot I have tried changing new to skype_id instead of the msn on, but not luck. Help please? What do i need to change in the patch.py file and where to get this to work?