Hey monks

I know, I suck. I don't know how md5 works per se. I assumed it worked with keys like SSH, but after digging through the Digest:MD5 module, it doesn't seem that way.

What I'm trying to achieve, is I want a script that will bid for me on an auction site (Yahoo Japan, not Ebay). Basically, there's a form on one page, which you fill in (bid amount + password), and on the next page, in the URL, is all the necessary variables in the URL, and of course, the confirm button. I can see in the URL a variable called 'passwd', which is taken from the previous pages text input. However, it's obviously encoded (always 32 characters). There is one hidden value passed by the form called ".challenge", which I would assume is the key. It is the only thing different in the form after every refresh. The 'passwd' value in the URL on the 2nd page is always different after every refresh as well. Here's a look at the HTML form (in Shift-JIS, if the mojibake bothers you).
<FORM METHOD="POST" ACTION="http://page14.auctions.yahoo.co.jp/jp/show +/bid_preview?" onSubmit="return hash(this, 'http://page14.auctions.ya +hoo.co.jp/jp/show/bid_preview');"> <input type=hidden name=".challenge" value="n_8nieof8Wku2cgXhWCS9jHtS7 +wr" > <INPUT TYPE="hidden" NAME="ItemID" VALUE="s18658837"> <INPUT TYPE="hidden" NAME="itemStyles" VALUE="&u=;brand_brand_jp&tp="> <INPUT TYPE="hidden" NAME="login" value="myaccountid"> <INPUT TYPE="hidden" NAME="cc" VALUE="jp"> <INPUT TYPE="hidden" NAME="md5"> <INPUT TYPE="hidden" NAME="Quantity" VALUE="1"> <TR><TD> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" WIDTH="100%"> <TR><TD COLSPAN="2" BGCOLOR="ffcc33" NOWRAP><FONT COLOR="333333"> <B>入札する</B><FONT SIZE=-2>(数字は半角で入力)</FONT></FONT></TD></ +TR> <TR><TD COLSPAN="2" ALIGN="center"><IMG SRC="http://img.yahoo.co.jp/i/ +space.gif" WIDTH="1" HEIGHT="2"></TD></TR> <TR><TD COLSPAN="2"><SMALL><FONT COLOR="#dd0000"> 1 円から入札できます </FONT></SMALL></TD></TR> <TR> <TD ALIGN="right" NOWRAP><SMALL> <A HREF="http://help.yahoo.co.jp/help/jp/auct/bid/bid-13.html">最高入 +D額</A>: </SMALL></TD> <TD NOWRAP><FONT COLOR="000000"><INPUT TYPE="text" NAME="Bid" SIZE="9" +><FONT SIZE="-2"> 円</FONT></FONT></TD> </TR> <TR> <TD ALIGN="right" NOWRAP><FONT COLOR="000000"><SMALL>パスワ[ド:</SMA +LL></FONT></TD> <TD><INPUT TYPE="password" SIZE="10" NAME="passwd" maxlength="32"></TD +> </TR> <INPUT TYPE="hidden" NAME="bidType" VALUE="1000"> <TR><TD COLSPAN="2" ALIGN="center"> <INPUT TYPE="Submit" VALUE=" 確認 "><BR> <SMALL> <A HREF="http://help.yahoo.co.jp/help/jp/auct/bid/">入札のヘ‹プ</A> </SMALL> </TD></TR></TABLE> </TD></TR></FORM>
Here's a look at the next page's URL:
http://page14.auctions.yahoo.co.jp/jp/show/bid_preview?.challenge=n_8n +ieof8Wku2cgXhWCS9jHtS7wr&ItemID=s18658837&itemStyles=%26u%3D%3Bbrand_ +brand_jp%26tp%3D&login=myaccountid&cc=jp&md5=&Quantity=1&Bid=1&passwd +=32charactershere&bidType=1000&.hash=1&.js=1&.md5=1
Any love?

In reply to md5 question by GaijinPunch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.