Jump to content
Sign in to follow this  
gregor

login script help

Recommended Posts

gregor

#include <IE.au3>

$oIE = _IECreate ("http://www.myspace.com/")

_IELoadWait ($oIE)

Send("{TAB 8}")

$emailname1 = "email"

$password1 = "password"

Sleep(500)

Send ($emailname1)

Sleep(500)

Send ("{TAB}")

Sleep(500)

Send ($password1)

Sleep(500)

;Send ("{TAB}{ENTER}")

--------------------------------------------

By sending tabs I can get the cursor to go the login fields and send text and successfully login. I am new and not sure of the terminology but I would like to get the name of the text field and send text directly there in case a different browser config does not use the same number of tabs.

Share this post


Link to post
Share on other sites
monoceres

Hi!

The functions in ie.au3 will help you :P

#include <ie.au3>

$obj=_IECreate("www.myspace.com",0)
$form=_IEFormGetObjByName($obj,"LoginForm")
$emailinput=_IEFormElementGetObjByName($form,"ctl00$ctl00$cpMain$cpMain$LoginBox$Email_Textbox")
$passwordinput=_IEFormElementGetObjByName($form,"ctl00$ctl00$cpMain$cpMain$LoginBox$Password_Textbox")
_IEFormElementSetValue($emailinput,"username@myspace.com")
_IEFormElementSetValue($passwordinput,"password")

I find all those values in the source code of the myspace homepage. Try it yourself :(


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
gregor

Hi!

The functions in ie.au3 will help you :mellow:

#include <ie.au3>

$obj=_IECreate("www.myspace.com",0)
$form=_IEFormGetObjByName($obj,"LoginForm")
$emailinput=_IEFormElementGetObjByName($form,"ctl00$ctl00$cpMain$cpMain$LoginBox$Email_Textbox")
$passwordinput=_IEFormElementGetObjByName($form,"ctl00$ctl00$cpMain$cpMain$LoginBox$Password_Textbox")
_IEFormElementSetValue($emailinput,"username@myspace.com")
_IEFormElementSetValue($passwordinput,"password")

I find all those values in the source code of the myspace homepage. Try it yourself :(

----------------------------

Thank you for pointing me in a promising direction. The example you have here works wonderfully and I will experiment with it to try and figure out how it works... :)

Share this post


Link to post
Share on other sites
Quafboy

Thanks so much for posting this. I'm starting a Myspace library.

Share this post


Link to post
Share on other sites
BJJ

How you found "ctl00$ctl00$cpMain$cpMain$LoginBox$Email_Textbox" in source ??

Share this post


Link to post
Share on other sites
Authenticity

<form action="http://secure.myspace.com/index.cfm?fuseaction=login.process" method="post" id="LoginForm" name="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMzYzMTA4NTc1ZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQU0Y3RsMDAkY3RsMDAkY3BNYWluJGNwT


WFpbiRMb2dpbkJveCRSZW1lbWJlcl9DaGVja2JveA==" />
</div>

            <input type="hidden" name="NextPage" id="NextPage" value=""  />
                                
            
            <p id="loginAttempts"></p>

            

                  <p><label id="ctl00_ctl00_cpMain_cpMain_LoginBox_Email_Textbox_Label" for="&lt;%= Email_Textbox.ClientID %>">Email:</label></p>
                  <p><input name="ctl00$ctl00$cpMain$cpMain$LoginBox$Email_Textbox" type="text" id="ctl00_ctl00_cpMain_cpMain_LoginBox_Email_Textbox" tabindex="1" /></p>
                  <p><label id="ctl00_ctl00_cpMain_cpMain_LoginBox_Password_Textbox_Label" for="&lt;%= Password_Textbox.ClientID %>">Password:</label></p>
                  <p><input name="ctl00$ctl00$cpMain$cpMain$LoginBox$Password_Textbox" type="password" id="ctl00_ctl00_cpMain_cpMain_LoginBox_Password_Textbox" tabindex="2" /></p>
                                          
                  <input name="ctl00$ctl00$cpMain$cpMain$LoginBox$SingleSignOnHash" type="hidden" id="ctl00_ctl00_cpMain_cpMain_LoginBox_SingleSignOnHash" /><input name="ctl00$ctl00$cpMain$cpMain$LoginBox$SingleSignOnRequestUri" type="hidden" id="ctl00_ctl00_cpMain_cpMain_LoginBox_SingleSignOnRequestUri" /><input name="ctl00$ctl00$cpMain$cpMain$LoginBox$nexturl" type="hidden" id="ctl00_ctl00_cpMain_cpMain_LoginBox_nexturl" /><input name="ctl00$ctl00$cpMain$cpMain$LoginBox$apikey" type="hidden" id="ctl00_ctl00_cpMain_cpMain_LoginBox_apikey" /><input name="ctl00$ctl00$cpMain$cpMain$LoginBox$ContainerPage" type="hidden" id="ctl00_ctl00_cpMain_cpMain_LoginBox_ContainerPage" />

                    <div>
                        <div id="loginBtnWrap2">

                            <div class="rightLgn">
                                <div class="leftLgn">
                                    <input id="dlb" name="dlb" type="submit" onclick="java script: return doSubmit();" value="Log In" tabindex="5" />
                                </div>
                            </div>
                        </div>
                        <div id="rememberMeWrap">
                            <input name="ctl00$ctl00$cpMain$cpMain$LoginBox$Remember_Checkbox" type="checkbox" id="ctl00_ctl00_cpMain_cpMain_LoginBox_Remember_Checkbox" tabindex="4" value="on" class="rememberMe" /><label id="ctl00_ctl00_cpMain_cpMain_LoginBox_lblrememberMe">Remember Me</label>

                        </div>
                    </div>
                    
                    <p class="small">
                    
                        <a id="ctl00_ctl00_cpMain_cpMain_LoginBox_ForgotPassword_Hyperlink" href="http://secure.myspace.com/index.cfm?fuseaction=user.retrievepassword&amp;MyToken=05fbcc62-9414-4097-bcda-2ec525cedf40">Forgot your password?</a>                          
                    </p>
                                                                       
        </form>

It's the third input... use ctrl+f it's much easier.

Edited by Authenticity

Share this post


Link to post
Share on other sites
TerarinK

They actively change them been changed up to 4 times already. So if you are writing a Myspace UDF I would take a look into finding the things that don't change such as Email_Textbox or simply Email AND Password_Textbox or simply Password. If you want my help I could send you a copy of Myspace UDF (incomplete but still working) I stopped on it about 6 months ago but it still works.


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
Share on other sites
ALFJ

Anyone have a working example of a working login script using winhttp or http?

1. Loing in using the POST method

2. Retrieving the cookie once successfully logging in

3. Going to a third page (int or ext) which requires the cookie of the first page to be able to go into it.

I know how to do this using an embedded IE but with http it would be faster for me.

Any help would be appreciated.

Thanks,

Edited by ALFJ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×