What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » javascript injections

Pages: (3): « First [ 1 ] 2 3 » Last »
javascript injections
Author: Message:
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. javascript injections
Hi everyone.

I'm trying to make a script like MySpace Manager but for hi5, but hi5 pages are .do...

My question is, how can I (if possible) use javascript injections to login using Microsoft.XMLHTTP:

say I want to login.

I open the browser on www.hi5.com
then type this on the url:
code:
javascript:void(document.loginForm.email.value="<email>");
void(document.loginForm.password.value="<password>");
void(document.loginForm.remember.checked=false);
void(document.loginForm.submit())

and it logins... My problem is how to use it on a script.

This post was edited on 09-09-2007 at 09:25 PM by WDZ.
Best Regards,
Joćo Godinho
09-08-2007 01:00 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: javascript injections
why not open the actual login page ("login.do for example") and then send the username and password as POST variables?
<Eljay> "Problems encountered: shit blew up" :zippy:
09-08-2007 02:03 PM
Profile PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: javascript injections
how can I do it? :^)

I haven't use XMLHTTP before so I'm in the dark... I've read somethings about it, but still..
Best Regards,
Joćo Godinho
09-08-2007 02:14 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: javascript injections
Based on the code from win_crook's reply to Web Services?.
code:
var sUrl = "http://www.hi5.com/friend/login.do";
var sEmail = "EMAIL";
var sPassword = "PASSWORD";

var ajax = new ActiveXObject("Microsoft.XMLHTTP");
ajax.open("POST", sUrl, true);
ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var sEncodedEmail = encodeURIComponent(sEmail);
var sEncodedPassword = encodeURIComponent(sPassword);

ajax.onreadystatechange = function() {
   if(ajax.readyState == 4 && ajax.status == 200) {
      Debug.Trace("Success!\nResponse text: "+ajax.responseText);
   }
}

ajax.send("email="+sEncodedEmail+"&password="+sEncodedPassword);
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-08-2007 03:16 PM
Profile E-Mail PM Web Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: RE: javascript injections
quote:
Originally posted by Mattike
Based on the code from win_crook's reply to Web Services?.
code:
var sUrl = "http://www.hi5.com/friend/login.do";
var sEmail = "EMAIL";
var sPassword = "PASSWORD";

var ajax = new ActiveXObject("Microsoft.XMLHTTP");
ajax.open("POST", sUrl, true);
ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var sEncodedEmail = encodeURIComponent(sEmail);
var sEncodedPassword = encodeURIComponent(sPassword);

ajax.onreadystatechange = function() {
   if(ajax.readyState == 4 && ajax.status == 200) {
      Debug.Trace("Success!\nResponse text: "+ajax.responseText);
   }
}

ajax.send("email="+sEncodedEmail+"&password="+sEncodedPassword);


Thanks Mattike, going to try it out ^^


Edit: Works like candy, many thanks Mattike :bow:

This post was edited on 09-09-2007 at 07:05 PM by LifelesS.
Best Regards,
Joćo Godinho
09-08-2007 05:23 PM
Profile E-Mail PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: javascript injections
Is it possible to use the remember feature of it?

I'm using

code:
ajax.send("email="+sEncodedEmail+"&password="+sEncodedPassword+"&remember=on");

but it doesn't work..
Best Regards,
Joćo Godinho
09-09-2007 07:21 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: javascript injections
Shouldn't remember be equal to true, not on?
<Eljay> "Problems encountered: shit blew up" :zippy:
09-09-2007 07:40 PM
Profile PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: javascript injections
I used Live HTTP headers and it send on :S

Going to try with true..
Best Regards,
Joćo Godinho
09-09-2007 07:41 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: javascript injections
The checkbox has 2 states when the form is submitted, either true (ticked) or false (not ticked). It's that that makes me think it needs changing
<Eljay> "Problems encountered: shit blew up" :zippy:
09-09-2007 07:42 PM
Profile PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: javascript injections
doesn't work either...

I guess I'll have to always call a login function..
Best Regards,
Joćo Godinho
09-09-2007 07:46 PM
Profile E-Mail PM Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On