From: Justin C on
There is a web-site, pages generated by asp, from which I want to
download a daily file. I have am registered with the site, and I pass my
login details to wget thus:

--post-data="Email=[removed]&Password=[removed]"

The problem is, however, I get a "302 Object moved" message, and am then
redirected to the registration page. I have tried using wget to connect
to the site first, and save-cookies/keep-session-cookies before trying
to login, but still no joy.

I think the site is using some obfuscation to prevent automation -
actually, it's more likely I'm not understanding how something in html
is working. Here's the form they use:

<FORM name="frmLogin" action="/Members.asp" method="POST">
Email:
<INPUT name="Email" value="" size=8 maxlength=50 style="width:80;">

Password:
<INPUT name="Password" value="" type="password" size=8 maxlength=20 style="width:80;">

<INPUT name="Login" type="image" src="/images/cmdLogin.gif" alt="Login" border="0">

<A href="/Members.asp">
<IMG src="/images/cmdRegister.gif" alt="Register" border="0">
</A>

<A href="/Forgot.asp">Forgotten Password</A>
</FORM>

The first two inputs are simple enough, the third, name="Login", is
clickable, but on hovering with a mouse there is no report in the status
bar to where clicking will take me. In addition, clicking the register
button links to the same page as the form does.

I don't understand how the input "type=image" is causing the form to be
submitted when it's not a link, nor a submit. I suppose, what I really
want to know, is what is it submitting?

Any help you can give solving this riddle will be gratefully received.

Justin.

--
Justin C, by the sea.
From: Peter Benie on
In article <slrng5ps9d.2rp.justin.0806(a)satori.local>,
Justin C <justin.0806(a)purestblue.com> wrote:
> <INPUT name="Login" type="image" src="/images/cmdLogin.gif" alt="Login" border="0">
>The first two inputs are simple enough, the third, name="Login", is
>clickable, but on hovering with a mouse there is no report in the status
>bar to where clicking will take me. In addition, clicking the register
>button links to the same page as the form does.
>
>I don't understand how the input "type=image" is causing the form to be
>submitted when it's not a link, nor a submit. I suppose, what I really
>want to know, is what is it submitting?

It is a type of submit button - the browser will send two parameters:
Login.x and Login.y, which are the mouse x and y coordinates respectively.
It will probably suffice to add &Login.x=0&Login.y=0 to your post data.

http://www.w3.org/TR/html401/interact/forms.html#h-17.4.1

Peter
From: Justin C on
On 2008-06-21, Peter Benie <peterb(a)chiark.greenend.org.uk> wrote:
>
> It is a type of submit button - the browser will send two parameters:
> Login.x and Login.y, which are the mouse x and y coordinates respectively.
> It will probably suffice to add &Login.x=0&Login.y=0 to your post data.
>
> http://www.w3.org/TR/html401/interact/forms.html#h-17.4.1

Thank you for this, it's the exact solution. The html is interesting, I
shall have another read shortly and hope the info sticks.

Justin.

--
Justin C, by the sea.