[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] URLplus
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] URLplus
- From: "Gary Baluha" <gumby3203 (at) gmail.com>
- Date: Wed, 30 Apr 2008 13:35:14 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=9LS5GZFKoyk9Yo5dvAWU6cw3IeepWs0unO2jKPzRjEk=; b=n0OcSjGXGg41V67fco6xtMeY6f6Sns450LDlwe13zCCluRL45b/ykTOAWp7/APfQbM450Rs8aFLL5bfIMg3Amtwq9ud2Hcz+CgCUKvzofGsD7eAfDacOfBReLk6jMXMg9sBz6NhDBRYke4XhQCNiyTqmvJJPj343B7BnAtzecuM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=xcENUUJbM/4rZCFNacWH9OaNU0QoL566llBWAsu6C0QTZaB6Wxxcwm72W+xJomZQve/tgq8dOnukCaAKJk0AJsjFxG4Rnm0t/cNugUin41liZEZ91vKe59fFyAUBZJeJGRda0beRDa7Ey7pu6Wyw8F41RU3q+Ya50ORyQbm5zr8=
- References: <997a524e0804291304h4b80f284jecda136de2840b9d (at) mail.gmail.com> <OF7E493A4A.5553E7AB-ONC125743B.002D6F02-C125743B.002D8038 (at) machcorp.lan> <997a524e0804301028k5f875ec8x4e4b34432d5ab20e (at) mail.gmail.com>
On Wed, Apr 30, 2008 at 1:28 PM, Ralph Mitchell <ralphmitchell (at) gmail.com>
wrote:
> Unfortunately it's not just one script. I've found many variations in
> login pages, so I've had to customize the scripts for each different
> target. Some logins require a form to be posted back, others are handled
> via WWW-Authenticate pop-up boxes and sometimes redirects have to be
> followed. That's not hard if the site uses Location headers, because curl
> can handle those, but I've also found meta-refresh tags and several types of
> javascript "go-elsewhere" redirects that have to be individually scripted.
And these are some of the same issues I've run in to while writing the
URLPlus script. I've been trying to slowly morph it into something that can
configured solely through the configuration file without having to change
any code, but that's easier said than done. Especially since the original
reason I was writing the script got removed, and is supposed to be converted
to yet another monitoring system (which so far hasn't progressed, probably
because of the fact that some of the monitors are non-trivial).
I posted something a year or so ago that might get you started. If I can
> find it, I'll post it again.
>
> Ralph Mitchell
>
>
>
> On Wed, Apr 30, 2008 at 3:16 AM, Thomas Laurids Pedersen <tlp (at) mach.com>
> wrote:
>
> > Would you share the bourne script. I need something quickly for only 1
> > site at the moment, so anything will do.
> >
> > Regards, Thomas
> >
> > [image: Inactive hide details for "Ralph Mitchell"
> > <ralphmitchell (at) gmail.com>]"Ralph Mitchell" <ralphmitchell (at) gmail.com>
> >
> >
> >
> > *"Ralph Mitchell" <ralphmitchell (at) gmail.com>*
> >
> > 29-04-2008 22:04
> > Please respond to
> > hobbit (at) hswn.dk
> >
> >
> > To
> >
> > hobbit (at) hswn.dk
> > cc
> >
> >
> > Subject
> >
> > Re: [hobbit] URLplus
> >
> > On Tue, Apr 29, 2008 at 2:28 PM, Thomas Laurids Pedersen <*tlp (at) mach.com*<tlp (at) mach.com>>
> > wrote:
> >
> > Can this new extension do the post like the builtin http test can
> > do ?
> >
> > Regards, Thomas
> >
> >
> > I don't think so, as it currently stands. This line:
> >
> > $ret=qx(curl -m $tout -s -k -S $pstr "$url" 2>&1);
> >
> > in showUrl is the bit that actually fetches the web page. To do a POST
> > using curl, you would need to change that to:
> >
> > $ret=qx(curl -m $tout -s -k -S -d $postArgs $pstr "$url" 2>&1);
> >
> > with matching additions elsewhere to fill the $postArgs variable with
> > whatever you want to post. If you're wanting to implement something that
> > performs a login, you'd probably want to track cookies as well.
> >
> > I'm not much of a perl programmer, so I'm not confident about making
> > such changes. On the other hand, I've done quite a lot of this in Bourne
> > shell...
> >
> > Ralph Mitchell
> >
>
>