Rod,
This reminds me of a script that was supposed to post news articles 
somewhere until the site decided to keep hackers and automatic scripts 
out by inserting a session ID in an intermediary form...

There is (always) a work around.  Look at html response and see how you 
can use regular expression (pattern matching) to extract the new 
URL/URI, some hidden data (there ought to be there) and do yet another 
POST after the initial one just like your browser would do with an 
onLoad().  Now if they catch hacking their site, that where the fun is 
right?

Poly
www.polystreet.com

> On Thu, 30 Oct 2003, Roderick A. Anderson wrote:
> [...]
> > There is a intermediate document being returned with an onLoad 
attribute
> > in the body tag to automagically submit the new form.
> >    Needless to say this causes my script to fail and the as_string 
method
> > doesn't include the original form and data or the intermediate form 
and
> > data.  (This making any sense?)
> 
> Options:
> 
> 0. Get the XML stuff working (recommended).
> 1. Figure out exactly what the script does and emulate it in your 
code.
> 2. Give up on libwww-perl and use browser automation.  Browsers know
>    about stuff like embedded script.  You should be able to do this 
from
>    any mainstream language, including Perl.  Keywords: COM, MSIE, 
XPCOM,
>    Mozilla, DCOP, Konqueror.
> 3. Use another language which has libraries that provide JavaScript
>    interpretation.  I imagine there's probably a Perl-Java bridge out
>    there, for example, and the httpuunit library can do this, though 
not
>    fantastically well (mostly because the browser object model 
bindings
>    are not fully implemented, and what is implemented is not a 
faithful
>    copy of browsers behaviour).
> 
> 
> John
> 
> 


Reply via email to