cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: telia.se login

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 4 Oct 2005 23:00:42 +0200 (CEST)

On Tue, 4 Oct 2005, zEUZ wrote:

> Ive managed to get the cookie working and i now get the login page. But im
> not sure how to do the post. Ive tried but it doesnt work.
>
> curl -L -b cookies -c cookies -o login.html
> https://komc.tewss.telia.se/adressbok/db/pck_html_Kontakt.starta -d
> "user=ME&password=MyPW"
>

> <FORM name="login" method="POST" action="/ssotcwss/login">

The 'action' field is where you should send the post.

> <INPUT type='hidden' name='auth_mode' value='basic'/>
> <INPUT type='hidden' name='ct_orig_uri'
> value='https://komc.tewss.telia.se:443/adressbok/db/pck_html_Kontakt.starta'>

These are two hidden fields you need to include in your post.

So, it would make a command line similar to this (all these should go on the
same line of course):

curl
  -L
  -b cookies
  -c cookies
  -o login.html
  -d auth_mode=basic
  -d "ct_orig_uri=https%3A%2F%2Fkomc.tewss.telia.se%3A443%2Fadressbok%2Fdb%2Fpck_html_Kontakt.starta"
  -d user=$USER
  -d password=$PASSWORD
  https://access.tewss.telia.se/ssotcwss/login

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-10-04