Using post to test user login
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 <user-00a5e44c48c0@xymon.invalid> 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 <user-b9fa55f5c833@xymon.invalid> wrote:I'm interested in this as well, as we use siteminder too! Pauluser-518eb92a87d3@xymon.invalid 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.
Attachments (2)