cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Javascript Interpreter for cURL

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Sun, 13 Aug 2006 16:26:28 -0500

Not really. To do it right would require building a large part of a
browser. For example:

1) suppose you *did* pick up the onLoad/onSubmit functions and they
use other functions that are included from different script files.
You'd need to build in a way to load those too, just in case.

2) what do you do if a page has more than onSubmit - I once had to
deal with a page that had multiple forms, each with its own submit
button. Which one would you pick??

3) I had some success pushing javascript through the Spidermonkey
javascript interpreter, to process a proxy autoconfig file. Even
then, I found some of the "builtin" functions were not actually built
into the interpreter. I had to dig them out of the Mozilla source,
where they were stored as javascript. Are you prepared to dig out all
the other "builtins" that aren't??

Take a look in the mailing list archives for more details on that.
Around June 26 2002, I think.

Ralph Mitchell

On 8/13/06, Pavan Balaji <balaji_at_mcs.anl.gov> wrote:
> Hi,
>
> Is it possible/feasible to integrate a Javascript-Interpreter in CURL? I
> am trying to auto-login into some websites that use javascript-redirects
> (onLoad/onSubmit-functions).
>
> Thanks,
>
> -- Pavan
>
> --
> Pavan Balaji,
> Mathematics and Computer Science (MCS) Division,
> Argonne National Laboratory (ANL)
> Ph: +1-630-252-3017
> http://www-unix.mcs.anl.gov/~balaji
>
Received on 2006-08-13