On Thu, Jan 27, 2011 at 8:40 PM, Slansky Lukas <[email protected]> wrote:
> See the attachment - this is a bit altered script that I use to fetch the 
> whole intranet that is secured with Cosign. You can try to study it...

Thanks. I successfully got it working using curl:

    #!/bin/bash -

    cookies='cookies.txt'
    username=xxxxxx
    password=xxxxxx
    loginpage='https://weblogin.mydomain/'
    wantedpage='http://www.lancs.mydomain/event.php'

    # GET login page, save any cookies
    curl -s "$loginpage" -c $cookies > /dev/null 2>&1

    # POST credientials to login page, loading and saving cookies again
    curl -s -b $cookies -d "login=$username&password=$password"
"$loginpage" -c $cookies > /dev/null 2>&1

    # GET wanted page, loading and saving cookies, following any redirects
    curl -s -L -b $cookies -c $cookies "$wantedpage" > /dev/null 2>&1

    curl -s -b $cookies -c $cookies -d "[stuff to POST]" "$wantedpage"
> /dev/null 2>&1

I've tried converting this to python code with httplib2 module, but no
dice. However, this is for another mailing list/forum.

Thanks for the great help!

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Cosign-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cosign-discuss

Reply via email to