cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: looking for a little command line help

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Thu, 27 May 2010 18:12:21 -0400

On Wed, May 26, 2010 at 9:55 PM, Paige Thompson <erratic_at_devel.ws> wrote:

> hey all, I'm having a bit of trouble getting curl to authenticate and get
> cookies from digg.com:
>
> curl -L -v -c asshat1234.txt -F
> "username=asshat1234,password=cheese123,persistent=on" "
> http://digg.com/login/prepare/digg"
>
> I've sort of been observing this process in fiddler2, the server sends a
> 302 after posting to prepare and it sends me to
> http://digg.com/login/verify/digg which is supposed to give me some
> cookies:
>

I think the server just isn't expecting a "multipart/form-data" submission.
 This seems to work:

      curl -L -v -c asshat1234.txt \
          -d "username=asshat1234&password=cheese123&persistent=on" \
          "http://digg.com/login/prepare/digg"

At least, the returned page contains a "Logout" link instead of a "Login"
link... :)

And I get these cookies:

  digg.com FALSE / FALSE 1306533282 ccc 1
  digg.com FALSE / FALSE 0 PHPSESSID 73b602aab980a19111178afb7741b388
  digg.com FALSE / FALSE 0 1337 1
  digg.com FALSE / FALSE 1338069282 gc 06afd08ab5ad91a0d44b00623b7155db
  digg.com FALSE / FALSE 1277416482 loginname asshat1234
  digg.com FALSE / FALSE 1277416482 id_hash
927ca1d58a8d7efeab28abb11b78b10b
  digg.com FALSE / FALSE 1277416482 last_auth_method digg
  digg.com FALSE / FALSE 1243461281 noPermaFrame deleted

Ralph Mitchell

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-28