[hobbit] Using post to test user login

Ralph Mitchell ralphmitchell at gmail.com
Sat Jun 24 01:43:07 CEST 2006


Attached are two files:

bb-siteminder.sh is an example script to demonstrate how to login

formextract.pl is a slightly modified copy of Daniel Stenberg's formfind.pl,
which can be found here:

   http://curl.haxx.se/docs/programs.html

I'm not a perl programmer, so any screwups in formextract are mine, not
Daniel's... :)

It's doubtful that the example script will work out of the box.  I've found
that I generally have to take it in easy stages - fetch the first page,
eyeball it, adjust the script, lather, rinse, repeat.

Ralph Mitchell


On 6/22/06, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
>
> OK, I'll see about working up a relatively generic script tonight.  As I
> recall it works something like:
>
>    curl -s -S -L -o home.html http://somesite.domain.com
>    FORM=`cat home.html | formextract.pl | sed -e 'some stuff'`
>    curl -s -S -L -o page.html $FORM
>
> That's *very* simplistic, though.  'formextract.pl' is a hack on '
> formfind.pl' which comes with curl.  It extracts form variables from a
> page and returns a string suitable for passing back to curl.  The 'sed' part
> is usually a bunch of substitutions to insert the userid and password.
>
> Ralph Mitchell
>
>
>
> On 6/22/06, PAUL WILLIAMSON <pwilliamson at mandtbank.com> wrote:
> >
> > I'm interested in this as well, as we use siteminder too!
> >
> > Paul
> >
> > >>> Shawn.Maschino at ge.com 06/22/06 9:41 AM >>>
> >             Thanks Ralph and Larry - if either of you can share an
> > example script that would be great.  We are using Siteminder for our
> > SSO
> > here so it sounds like it may be easy to steal, er, borrow, what you
> > have to get it working.
> >
> >
> >
> > To unsubscribe from the hobbit list, send an e-mail to
> > hobbit-unsubscribe at hswn.dk
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20060623/0627fec2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb-siteminder.sh
Type: application/x-sh
Size: 6163 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20060623/0627fec2/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: formextract.pl
Type: text/x-perl
Size: 5467 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20060623/0627fec2/attachment.pl>


More information about the Xymon mailing list