Sign in to follow this  
Followers 0
kctvt

How to Auto Login to Forum ???

13 posts in this topic

I can auto login to Gmail, yahoo mail. But, i dont know how to auto login to Forum.

This's my code to login to Gmail and Yahoo:

1. Yahoo:

#include <IE.au3>

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

$o_form = _IEFormGetObjByName ($oIE, "login_form")

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, ".save")

$username = "Type Your Email"

$password = "Type Your Password"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_signin, "click")

And the Gmail:

#include <IE.au3>

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

$o_form = _IEFormGetObjByName ($oIE, "gaia_loginform")

$o_login = _IEFormElementGetObjByName ($o_form, "Email")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "signIn")

$username = "Type your Email"

$password = "type your pass"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_signin, "click")

<form id="gaia_loginform" action="http://www.google.com/accounts/ServiceLoginAuth?service=mail" method="post" onsubmit="return(gaia_onLoginSubmit());">

So.... Can you help me... show me how to login to Forum .

Such as a Forum : http://autoitviet.com

My code for auto login this Forum:

#include <IE.au3>

$oIE = _IECreate ("http://autoitviet.com/index.php")

$o_form = _IEFormGetObjByName ($oIE, "login.php?do=login")

$o_login = _IEFormElementGetObjByName ($o_form, "vb_login_username")

$o_password = _IEFormElementGetObjByName ($o_form, "vb_login_password")

$o_signin = _IEFormElementGetObjByName ($o_form, "s")

$username = "Type your Acc"

$password = "Type your Pass"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_signin, "click")

I Know this code's wrong. But... can u show me the right code ?

Share this post


Link to post
Share on other sites



According to these rules, you are NOT allowed to autologon to the forums:

Look here for the rules.

Anyone found abusing the website is subject to harsh punishment withoutwarning. A non-exhaustive list of potential abuses include:

  • Automated forum registration or login.
  • Automated posting or sending messages on the forum.
  • Automated manipulation of polls, user reputation or other forum features.
  • Automated creation or comments on issue tracker tickets.
  • Automated creation or editing of wiki pages.
  • Excessive downloading of pages or files.
  • Excessive frequency when downloading RSS feeds.
  • Other abuses which are either examples of excessive bandwidth usage or automation of the site.

If you learn from It, it's not a mistake

Share this post


Link to post
Share on other sites

Ah, I thought he/she was asking for this forum.

Of course, other forums may/will have different rules.


If you learn from It, it's not a mistake

Share this post


Link to post
Share on other sites

<FORM onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)" method=post action=login.php?do=login>

The form has no name or ID and trying to use other text in the form tag, like the action string, is often attempted but will not work.

To get the form reference, first see the Remarks in the helpfile for _IEFormGetObjByName and use _IEFormGetCollection with an index (in this case, 0).

Alternately, you can get references to the two input fields and the button with _IEGetObjById instead of using the _IEFormGet* or _IEFormElementGet* functions.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Thanks DaleHohm. I dit it >_<

#include <IE.au3>

; Create a browser window and navigate to hotmail

$oIE = _IECreate ("http://www.autoitscript.com/forum/index.php?app=core&module=global&section=login")

; get pointers to the login form and username, password and signin fields

$o_form = _IEFormGetCollection ($oIE, 0)

$o_login = _IEFormElementGetCollection ($o_form, 0)

$o_password = _IEFormElementGetCollection ($o_form, 1)

$username = "NICKKK"

$password = "PASSSS"

; Set field values and submit the form

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEFormSubmit ($o_form)

_IELoadWait ($oIE)

I can log to Username. But Cant log to Password .

I dont understand this:

_IEFormElementGetCollection ($o_form, 1)

Can you say something more about that...

Share this post


Link to post
Share on other sites

i need something like this.. i have a forums website i wish to post my scripts to exclusively.. meaning that you have to login to that site through my programs in order to use them.. is that possible?

Share this post


Link to post
Share on other sites

If the form elements have names you don't need to use the *Collection function and can use code like in your forst post. You needed the new method for the form,

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

umm...

I'll get this website, It'll be more clearly. Dont have ID, Name.

<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf, 0)">

#include <IE.au3>

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

$o_form = _IEFormGetCollection ($oIE, 0)

$o_login = _IEFormElementGetCollection ($o_form, 0)

$o_password = _IEFormElementGetCollection ($o_form, 2)

$username = "NICKKKK"

$password = "PASSSSS"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

Sleep(3000)

_IEFormSubmit ($o_form)

_IELoadWait ($oIE)

I changed "0" by "2"

It worked.

But sometime, It don't work.

After Auto Login, I begin Auto Post.

Edited by kctvt

Share this post


Link to post
Share on other sites

After Finish Auto Login, I begin Auto Post

Code Form Quick Reply:

<form action="newreply.php?do=postreply&t=3076" method="post" name="vbform" onsubmit="returnqr_prepare_submit(this,10);" id="qrform">

Code Form Message:

<textarea name="message" id="vB_Editor_QR_textarea" rows="10" cols="60" style="height: 100px; width: 100%; "tabindex="1" dir=ltr">

Code Button Submit:

<input type="submit class="button" value="Goi Tra Loi" accesskey="s" title="(Alt + S)" name="sbutton" tabindex="2" id="qr_submit" onclick="clickedelm = this.value">

And this is my Code :

#include <IE.au3>

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

sleep(1000)

$o_form = _IEFormGetCollection ($oIE, 0)

$o_login = _IEFormElementGetCollection ($o_form, 0)

$o_password = _IEFormElementGetCollection ($o_form, 2)

$username = "NICKKKKK"

$password = "PASSSSSS"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

Sleep(3000)

_IEFormSubmit ($o_form)

_IELoadWait ($oIE)

Sleep(8000)

$nhap=_IENavigate ($oIE, "http://dzo8.com/8/showthread.php?p=36043")

$o_Form2 = _IEFormGetObjByName($nhap, "vbform")

$o_Text = _IEFormElementGetObjByName ($nhap, "message")

$Button = _IEFormElementGetObjByName ($nhap, "sbutton")

_IEFormElementSetValue ($o_Text, "aaaaad TEXT MMMMMMMMMMMMMMsadfsfsdfsdfsdfS")

Sleep(3000)

_IEAction ($Button, "Click")

_IELoadWait ($oIE)

It can Login Website, but cant Post Reply. I dont know why...

It have Name, ID... but not work.

Share this post


Link to post
Share on other sites

Perhaps there is more than one INPUT field with a name of sButton? If so, you can use the optional index parameter to _IEFormElementGetObjByName. In your case however, it will be easier to use

$Button = _IEGetObjById($nhap, "qr_submit")

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

umm.... I changed...

But it cant work too. My friend tell me this website use a special security ... so ... we cant auto post reply on this website.

It's a new VPP Version.

Share this post


Link to post
Share on other sites

Perhaps, but not likely. Please pay close attention to the messages sent to the SciTe console.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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  
Followers 0