2006-08-16

MS Live Space hack

That's ironic, MS products are well-known for easy to use, but one thing I hate MS Live Space is it's very difficult to delete spams. I open trackback privilege for anyone, so here come the spams. I think MS do a good job on blocking spam. But I still got 15 spam trackbacks yesterday.

In live space home page, MS only display the latest 5 trackbacks, I have to delete them one by one, and I have to confirm my deletion each time. MS Live Space is slow here in China, so it's a great challenge for my patience.
My friends think I'm a patient man. Eh, I hope I were. But yesterday, I decided to do some hack.

MS provides MSN Spaces MetaWeblog API (http://msdn.microsoft.com/live/gettingstarted/spacesstart/default.aspx) to edit blog by code. I've found it very powerful but unfortunately there is no API to delete trackback. I have to find another way.

Let's back to source, it's easy to found each time I confirm deletion, the job is done by another URL. The URL is generated as:
window.location.protocol+"//"+window.location.hostname+"/DeleteBlogItem.aspx?handle="+O+"&item="+N+"&delete=true&domain="+document.domain

To be frank, I'm not a javascript expert. It took me some time to figure out the value of window.location.protocol, window.location.hostname etc. Guess how I did that? It's a silly way so I would just say that del.icio.us can be used as a variable viewer!

Anyway, let's say my Live Space is thesimonspace.spaces.live.com and the trackback I want to delete is cns!512FA623748C31AB!527, the job is done by:
http://thesimonspace.spaces.live.com/DeleteBlogItem.aspx?handle=cns!512FA623748C31AB!527&item=trackback&delete=true&domain=live.com&ru=myspace

But it doesn't work! I review the javascript again and realized I need to set some information in cookie. Finally, the following code deleted trackback cns!512FA623748C31AB!527 successfully!

document.cookie="DeleteHandle=cns!512FA623748C31AB!527;path=/;domain=thesimonspace.spaces.live.com;";
window.navigate("http://thesimonspace.spaces.live.com/DeleteBlogItem.aspx?handle=cns!512FA623748C31AB!527&item=trackback&delete=true&domain=live.com&ru=myspace");

I think FireFox don't support window.navigate(), but how could a FireFox lover loves MS Live Space?Anyone want to write a plugin to do it automatically?

Tag: Live Space hack javascript

1 Comments:

At 4/9/06 12:39, Simon Li said...

To run the javascript in IE, just type

script:document.cookie="DeleteHandle=cns!512FA623748C31AB!527;path=/;domain=thesimonspace.spaces.live.com;";window.navigate("http://thesimonspace.spaces.live.com/DeleteBlogItem.aspx?handle=cns!512FA623748C31AB!527&item=trackback&delete=true&domain=live.com&ru=myspace");

in the address bar (as a single line) and press enter.

 

Post a Comment

<< Home