I am building a script to automate some tasks in a classifieds site I use frequently. I have successfully scripted everything except for 1 piece. I have examined the HTTP posts during login, and there are 2 form values that are being dynamically added to the DOM just before form submission: "x" and "y". I know this because x and y appear in my form post inspector, but these do NOT appear in the page source anywhere. These get set to different integers each time, and I believe they're being used to defeat scripted logins. I believe the server-side code is checking for a match on those 2 vars. The funny thing is the system allows me to login via script (no errors or warnings - I am just not submitting x and y), but when I get down to submitting a classified item, it is not successful. I know I am successfully submitting all form vars on all pages EXCEPT for this x/y stuff on the login page, because all the rest are static.
If I could figure out how to use firebug to attach to the form submit (login) button somehow, and debug through that, I'm sure I could find the mystery code adding the 2 form elements. Or maybe there's a more straightforward way to discover this.