[hobbit] Using post to test user login
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.
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
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 $FORMThat'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
participants (2)
-
pwilliamson@mandtbank.com
-
ralphmitchell@gmail.com