Some help, this.loginData

Hello,

Please any one tell me how to get the login form,

this.loginData=["http://mail.fo","email","password","where I can get this"]

I know how to get email and password, but the third one I don't know.

Please, any idea.

Does this help?
http://xnotifier.tobwithu.com/wp/forums/topic/how-to-write-webmail-notif...

Note that the third item is explained as "other input fields data" ...if there are no other input fields, then perhaps you can just omit that part.  From the link above:

  • loginData : [ formSubmitURL, usernameField, passwordField, additionalData ]
    • formSubmitURL : action url of the login form
    • usernameField : input field name of username
    • passwordField : input field name of password
    • additionalData : other input fields data
jeroen's picture

In the by RpD's mentioned post admin explains the script usage for the most simple (single step) login process. Most providers use more complex login process now, involving multiple steps (meaning more communication steps between client (your pc) and server, involving storing client-side cookies, replying the server-side session-id and more).

In a post to the server parameters are seperated by an &. The server application reads out the string followed by ? and separates the parameters by delimiter &. For example:
http://webmail.provider.xx/?username=xxx&password=xxx&sessid=xxx&key=xxx
(In a simple single login process you can login by entering such a line in your browser's address field)

When you inspect the login form html of a login page you often can spot extra input fields beside the username and password, but mostly the necessary input fields are provided by the server in the following replies you need to catch using your choice of developer tool.

To answer your question with my simplified example the script would need:
this.loginData=["http://webmail.provider.xx","username","password","sessid=xxx&key=xxx"]

But the (for example) sessid and key values need to be extracted from the server html reply/replies in the scripts process function. How this works depends on your provider's choice of login process.

So hey... it's not straightforward. That is why not everybody can figure it out.

Hope this makes some sense ;-)

youcef_20's picture

Thanks RpD, that post is useful.

And thank you jeroen for the explain.

Now I understand.