curl-and-php
Re: Not able to follow redirections
Date: Wed, 8 Aug 2007 19:24:41 +0530 (IST)
>> You seem to be guessing blindly how to do this. Use LiveHTTPHeaders to
>> record
>> a manual "login", then use curl (with --trace-ascii) to work out the
>> exact
>> way to reproduce it (--trace-ascii of course used to verify that the
>> protocol
>> parts look similar enough to the the original manual approach) and then
>> you
>> translate it over to use PHP/CURL again (possibly curl --libcurl can
>> help
>> you
>> do that faster).
>>
Hello,
At the outset, kindly excuse me for sending this long mail (contains
the generated code). About the problem: I am able to access the remote
site "www.somesite.com", through the browser by furnishing the credentials
(userid=xxxxxx_at_aa.bb.cc, passwd=yyyyyy). However, I am not able to get the
same results when I use "curl" in command line (the command with options
is enclosed in this mail). I have enclosed the liveHTTPheader traces got
during a successful login. Kindly let me know how I could reproduce this
when I use "curl" in command line.
Thanks in advance
-gowranga
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On liveHTTPheader the "generator" appears as
GET /
GET /sso2/styles.css
GET /local_scripts/headers/header.js
GET /img/somesite-logo-new.gif
GET /img/somesite-logo-new.gif
GET /favicon.ico
POST /sso2/check_user.htm userid=xxxxxx%40aa.bb.cc&passwd=yyyyyy&sub=Sign+In
GET /local_scripts/sso_styles.css
GET /local_scripts/styles.css
GET /local_scripts/new-base.css
GET /local_scripts/somesite.css
GET /local_scripts/contribute.css
GET /local_scripts/header.css
GET /local_scripts/new-box.css
GET /local_scripts/boxes.css
GET /img/fl_bg.gif
POST /sso2/getencrypt.htm
code=-----BEGIN+PGP+MESSAGE-----%0D%0AVersion%3A+GnuPG+v1.2.4+%28GNU%2FLinux%29%0D%0A%0D%0AowGbwMvMwCT4XvPwiRaLzC2Mp9WTGNx2aMkYpViaGpokJpoYGZgam6daJJklm6Um%0D%0AmhkaphlbmphaJnF12DOzglXCtAoyKU5hmCt4ctmuedorNQI3lK7nmPxRZ0V1Rz3D%0D%0AgtY8o08mF5aqyi3Wfrst51TYiq9p2wA%3D%0D%0A%3DUodH%0D%0A-----END+PGP+MESSAGE-----%0D%0A&userid=xxxxxx%40aa.bb.cc
GET /local_scripts/styles.css
GET /local_scripts/new-base.css
GET /local_scripts/somesite.css
GET /img/bullet_grey.gif
GET /favicon.ico
GET /img/header-bg-someusers.jpg
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On liveHTTPheader the "header" appears as
GET / HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
HTTP/1.x 302 Moved Temporarily
Date: Tue, 07 Aug 2007 08:14:01 GMT
Server: NoInfo/NoInfo (Unix)
Set-Cookie: sso_page=%2F
Set-Cookie: sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location:
https://secure.somesite.com/sso2/getsignid.htm?signid=2d9514aa420537e8b6c6ea611f39459b&path=www.somesite.com%2Fsso2&f=somesite
Content-Type: text/html
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
https://secure.somesite.com/sso2/getsignid.htm?signid=2d9514aa420537e8b6c6ea611f39459b&path=www.somesite.com%2Fsso2&f=somesite
GET
/sso2/getsignid.htm?signid=2d9514aa420537e8b6c6ea611f39459b&path=www.somesite.com%2Fsso2&f=somesite
HTTP/1.1
Host: secure.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
HTTP/1.x 302 Found
Date: Tue, 07 Aug 2007 08:14:14 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.9.7d
X-Powered-By: PHP/4.3.9
Set-Cookie: Test_cookie_on_off=1
Set-Cookie: sso_login=a3b63bcf7eb642388111bfebd85d9c2b; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: https://secure.somesite.com/sso2/login.htm
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
https://secure.somesite.com/sso2/login.htm
GET /sso2/login.htm HTTP/1.1
Host: secure.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: Test_cookie_on_off=1; sso_login=a3b63bcf7eb642388111bfebd85d9c2b
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:14:14 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.9.7d
X-Powered-By: PHP/4.3.9
Set-Cookie: Test_cookie_on_off=1
Set-Cookie: From=someusers
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
https://secure.somesite.com/sso2/styles.css
GET /sso2/styles.css HTTP/1.1
Host: secure.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://secure.somesite.com/sso2/login.htm
Cookie: Test_cookie_on_off=1; From=someusers;
sso_login=a3b63bcf7eb642388111bfebd85d9c2b
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:14:16 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.9.7d
X-Powered-By: PHP/4.3.9
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http://www.somesite.com/local_scripts/headers/header.js
GET /local_scripts/headers/header.js HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:14:05 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Tue, 03 Jan 2006 08:43:44 GMT
Etag: "115c06b-60-43ba3940"
Accept-Ranges: bytes
Content-Length: 96
Content-Type: application/x-javascript
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/img/somesite-logo-new.gif
GET /img/somesite-logo-new.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:14:06 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Tue, 29 Aug 2006 10:06:36 GMT
Etag: "10e05e2-579-44f411ac"
Accept-Ranges: bytes
Content-Length: 1401
Content-Type: image/gif
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/img/somesite-logo-new.gif
GET /img/somesite-logo-new.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:14:06 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Tue, 29 Aug 2006 07:39:41 GMT
Etag: "10e05e5-548-44f3ef3d"
Accept-Ranges: bytes
Content-Length: 1352
Content-Type: image/gif
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
https://secure.somesite.com/favicon.ico
GET /favicon.ico HTTP/1.1
Host: secure.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: sso_login=a3b63bcf7eb642388111bfebd85d9c2b
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:14:18 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.9.7d
Last-Modified: Mon, 06 Nov 2006 04:30:48 GMT
Etag: "694400-57e-454eba78"
Accept-Ranges: bytes
Content-Length: 1406
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: image/x-icon
----------------------------------------------------------
https://secure.somesite.com/sso2/check_user.htm
POST /sso2/check_user.htm HTTP/1.1
Host: secure.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://secure.somesite.com/sso2/login.htm
Cookie: Test_cookie_on_off=1; From=someusers;
sso_login=a3b63bcf7eb642388111bfebd85d9c2b
Content-Type: application/x-www-form-urlencoded
Content-Length: 60
userid=xxxxxx%40aa.bb.cc&passwd=yyyyyy&sub=Sign+In
HTTP/1.x 302 Found
Date: Tue, 07 Aug 2007 08:15:23 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.9.7d
X-Powered-By: PHP/4.3.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: https://secure.somesite.com/sso2/loggedin.htm
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
https://secure.somesite.com/sso2/loggedin.htm
GET /sso2/loggedin.htm HTTP/1.1
Host: secure.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://secure.somesite.com/sso2/login.htm
Cookie: Test_cookie_on_off=1; From=someusers;
sso_login=a3b63bcf7eb642388111bfebd85d9c2b
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:24 GMT
Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.9.7d
X-Powered-By: PHP/4.3.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http://www.somesite.com/local_scripts/sso_styles.css
GET /local_scripts/sso_styles.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:14 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Fri, 27 Apr 2007 09:43:49 GMT
Etag: "11381a9-124-4631c5d5"
Accept-Ranges: bytes
Content-Length: 292
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/styles.css
GET /local_scripts/styles.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/sso_styles.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:14 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Thu, 23 Nov 2006 04:04:04 GMT
Etag: "113802e-1ad-45651db4"
Accept-Ranges: bytes
Content-Length: 429
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/new-base.css
GET /local_scripts/new-base.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
HTTP/1.x 200 OK
Date: Wed, 27 Jun 2007 11:25:09 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Wed, 02 May 2007 10:19:58 GMT
Etag: "13d006f-3c62-463865ce"
Accept-Ranges: bytes
Content-Length: 15458
Content-Type: text/css
Age: 4450
X-Cache: HIT from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/somesite.css
GET /local_scripts/somesite.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/sso_styles.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:14 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Thu, 03 May 2007 01:53:03 GMT
Etag: "1138198-9e8-4639407f"
Accept-Ranges: bytes
Content-Length: 2536
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/contribute.css
GET /local_scripts/contribute.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:15 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Mon, 21 Aug 2006 15:29:44 GMT
Etag: "11382a6-212-44e9d168"
Accept-Ranges: bytes
Content-Length: 530
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/header.css
GET /local_scripts/header.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:15 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Fri, 08 Sep 2006 05:11:44 GMT
Etag: "11382ae-83f-4500fb90"
Accept-Ranges: bytes
Content-Length: 2111
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/new-box.css
GET /local_scripts/new-box.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:15 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Wed, 27 Sep 2006 06:57:11 GMT
Etag: "11382b6-58f-451a20c7"
Accept-Ranges: bytes
Content-Length: 1423
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/boxes.css
GET /local_scripts/boxes.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:15 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Wed, 28 Dec 2005 07:50:30 GMT
Etag: "11381cd-2e6-43b243c6"
Accept-Ranges: bytes
Content-Length: 742
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/img/fl_bg.gif
GET /img/fl_bg.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/somesite.css
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:16 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Thu, 03 May 2007 01:53:52 GMT
Etag: "10e00ef-22a7-463940b0"
Accept-Ranges: bytes
Content-Length: 8871
Content-Type: image/gif
X-Cache: MISS from proxy2
Proxy-Connection: keep-alive
----------------------------------------------------------
http://www.somesite.com/sso2/getencrypt.htm
POST /sso2/getencrypt.htm HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: sso_page=%2F; sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5
Content-Type: application/x-www-form-urlencoded
Content-Length: 352
code=-----BEGIN+PGP+MESSAGE-----%0D%0AVersion%3A+GnuPG+v1.2.4+%28GNU%2FLinux%29%0D%0A%0D%0AowGbwMvMwCT4XvPwiRaLzC2Mp9WTGNx2aMkYpViaGpokJpoYGZgam6daJJklm6Um%0D%0AmhkaphlbmphaJnF12DOzglXCtAoyKU5hmCt4ctmuedorNQI3lK7nmPxRZ0V1Rz3D%0D%0AgtY8o08mF5aqyi3Wfrst51TYiq9p2wA%3D%0D%0A%3DUodH%0D%0A-----END+PGP+MESSAGE-----%0D%0A&userid=xxxxxx%40aa.bb.cc
HTTP/1.x 302 Moved Temporarily
Date: Tue, 07 Aug 2007 08:15:23 GMT
Server: NoInfo/NoInfo (Unix)
Set-Cookie: sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://www.somesite.com/
Content-Type: text/html
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/
GET / HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: sso_page=%2F; sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:23 GMT
Server: NoInfo/NoInfo (Unix)
Vary: Cookie,Host
Content-Type: text/html
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/styles.css
GET /local_scripts/styles.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/
Cookie: sso_page=%2F; sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:25 GMT
Server: NoInfo/NoInfo (Unix)
Vary: Cookie,Host
Last-Modified: Mon, 11 Dec 2006 02:15:54 GMT
Etag: "10f8704-100-457cbf5a"
Accept-Ranges: bytes
Content-Length: 256
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/new-base.css
GET /local_scripts/new-base.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
If-Modified-Since: Wed, 02 May 2007 10:19:58 GMT
If-None-Match: "13d006f-3c62-463865ce"
HTTP/1.x 304 Not Modified
Date: Wed, 27 Jun 2007 11:25:09 GMT
Content-Type: text/css
Last-Modified: Wed, 02 May 2007 10:19:58 GMT
Age: 4461
X-Cache: HIT from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/local_scripts/somesite.css
GET /local_scripts/somesite.css HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/styles.css
Cookie: sso_page=%2F; sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:26 GMT
Server: NoInfo/NoInfo (Unix)
Vary: Cookie,Host
Last-Modified: Wed, 20 Dec 2006 08:53:51 GMT
Etag: "10f85e2-6a7-4588fa1f"
Accept-Ranges: bytes
Content-Length: 1703
Content-Type: text/css
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/img/bullet_grey.gif
GET /img/bullet_grey.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/new-base.css
HTTP/1.x 200 OK
Date: Wed, 25 Jul 2007 06:59:15 GMT
Server: NoInfo/NoInfo (Unix)
Last-Modified: Wed, 28 Dec 2005 07:50:27 GMT
Etag: "10e02a7-3b-43b243c3"
Accept-Ranges: bytes
Content-Length: 59
Content-Type: image/gif
Age: 4459
X-Cache: HIT from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/favicon.ico
GET /favicon.ico HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: sso_page=%2F; sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:26 GMT
Server: NoInfo/NoInfo (Unix)
Vary: Cookie,Host
Last-Modified: Tue, 08 Aug 2006 18:09:04 GMT
Etag: "10b9090-308-44d8d340"
Accept-Ranges: bytes
Content-Length: 776
Content-Type: image/x-icon
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
http://www.somesite.com/img/header-bg-someusers.jpg
GET /img/header-bg-someusers.jpg HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5)
Gecko/20070713 Firefox/2.0.0.5
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.somesite.com/local_scripts/somesite.css
Cookie: sso_page=%2F; sso_www_somesite_com=u3lkppbj0n4nunuqa7jtevbjb5
HTTP/1.x 200 OK
Date: Tue, 07 Aug 2007 08:15:26 GMT
Server: NoInfo/NoInfo (Unix)
Vary: Cookie,Host
Last-Modified: Wed, 29 Nov 2006 05:19:29 GMT
Etag: "10e057b-2a19-456d1861"
Accept-Ranges: bytes
Content-Length: 10777
Content-Type: image/jpeg
X-Cache: MISS from proxy2
Proxy-Connection: close
----------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HAVE USED THE FOLLOWING "curl" COMMAND LINE TOOL
# curl -x proxy1:3128
-d"userid=xxxxxx%40aa.bb.cc&passwd=yyyyyy&sub=Sign+In" --location-trusted
www.somesite.com -e ";auto" --trace-ascii filetrace -b /tmp/cookie -c
/tmp/cookie --libcurl filecurl
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ON USING "curl" IN COMMAND LINE, the content of "filetrace" is
== Info: About to connect() to proxy proxy1 port 3128 (#0)
== Info: Trying 10.26.25.44... == Info: connected
== Info: Connected to proxy1 (10.26.25.44) port 3128 (#0)
=> Send header, 313 bytes (0x139)
0000: POST http://www.somesite.com HTTP/1.1
002a: User-Agent: curl/7.16.2 (i686-pc-linux-gnu) libcurl/7.16.2 OpenS
006a: SL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
008f: Host: www.somesite.com
00aa: Pragma: no-cache
00bc: Accept: */*
00c9: Referer:
00d4: Proxy-Connection: Keep-Alive
00f2: Content-Length: 60
0106: Content-Type: application/x-www-form-urlencoded
0137:
=> Send data, 60 bytes (0x3c)
0000: userid=xxxxxx%40aa.bb.cc&passwd=yyyyyy&sub=Sign+In
<= Recv header, 32 bytes (0x20)
0000: HTTP/1.0 302 Moved Temporarily
<= Recv header, 37 bytes (0x25)
0000: Date: Tue, 07 Aug 2007 08:33:46 GMT
<= Recv header, 30 bytes (0x1e)
0000: Server: NoInfo/NoInfo (Unix)
== Info: Added cookie sso_page="%2F" for domain www.somesite.com, path /,
expire 0
<= Recv header, 26 bytes (0x1a)
0000: Set-Cookie: sso_page=%2F
== Info: Added cookie sso_www_somesite_com="t0miugm6dk7u9tjp6682eimt90"
for domain www.somesite.com, path /, expire 0
<= Recv header, 72 bytes (0x48)
0000: Set-Cookie: sso_www_somesite_com=t0miugm6dk7u9tjp6682eimt90;
0040: path=/
<= Recv header, 40 bytes (0x28)
0000: Expires: Thu, 19 Nov 1981 08:52:00 GMT
<= Recv header, 79 bytes (0x4f)
0000: Cache-Control: no-store, no-cache, must-revalidate, post-check=0
0040: , pre-check=0
<= Recv header, 18 bytes (0x12)
0000: Pragma: no-cache
<= Recv header, 142 bytes (0x8e)
0000: Location: https://secure.somesite.com/sso2/getsignid.htm?signid=97
0040: bca6f415e3ae4d6fad42ed784077c1&path=www.somesite.com%2Fsso2&f
0080: =somesite
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 46 bytes (0x2e)
0000: X-Cache: MISS from proxy2
<= Recv header, 25 bytes (0x19)
0000: Proxy-Connection: close
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 0 bytes (0x0)
== Info: Closing connection #0
== Info: Issue another request to this URL:
'https://secure.somesite.com/sso2/getsignid.htm?signid=97bca6f415e3ae4d6fad42ed784077c1&path=www.somesite.com%2Fsso2&f=somesite'
== Info: Disables POST, goes with GET
== Info: About to connect() to proxy proxy1 port 3128 (#0)
== Info: Trying 10.26.25.44... == Info: connected
== Info: Connected to proxy1 (10.26.25.44) port 3128 (#0)
== Info: Establish HTTP proxy tunnel to secure.somesite.com:443
=> Send header, 202 bytes (0xca)
0000: CONNECT secure.somesite.com:443 HTTP/1.0
0028: Host: secure.somesite.com:443
0045: User-Agent: curl/7.16.2 (i686-pc-linux-gnu) libcurl/7.16.2 OpenS
0085: SL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
00aa: Proxy-Connection: Keep-Alive
00c8:
<= Recv header, 37 bytes (0x25)
0000: HTTP/1.0 200 Connection established
<= Recv header, 2 bytes (0x2)
0000:
== Info: Proxy replied OK to CONNECT request
== Info: successfully set certificate verify locations:
== Info: CAfile: /usr/local/share/curl/curl-ca-bundle.crt
CApath: none
== Info: SSLv2, Client hello (1):
=> Send SSL data, 124 bytes (0x7c)
0000: ....c......9..8..5..............3..2../.....f..............c..b.
0040: .a...........@..e..d..`......................O.V"np...._..z,
== Info: SSLv3, TLS handshake, Server hello (2):
<= Recv SSL data, 74 bytes (0x4a)
0000: ...F..F..v....!u.....i\u.l..:.H....j.{ u........3Nw0.!b..a..<e..
0040: "....#..9.
== Info: SSLv3, TLS handshake, CERT (11):
<= Recv SSL data, 2111 bytes (0x83f)
0000: ...;..8...0...0..........IO...Q`h.e...t..0...*.H........0..1.0..
0040: .U....VeriSign Trust Network1.0...U....VeriSign, Inc.1301..U...*
0080: VeriSign International Server CA - Class 31I0G..U..._at_www.verisig
00c0: n.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign0...0602150
0100: 00000Z..080308235959Z0..1.0...U....US1.0...U....New Hampshire1.0
0140: ...U....Lebanon1.0...U....Somesite Inc.1.0...U....Web Services1301
0180: ..U...*Terms of use at www.verisign.com/rpa (c)051.0...U....secu
01c0: re.somesite.com0..0...*.H............0.........Y.F..!...Q..r......
0200: .....Q.R.q5.6.d..q......&.r1...K@.-.0..O...26(.....HQW.=...}....
0240: m#.ZB....".*....Z.....T]..4K....i.7.F.._...........0...0...U....
0280: 0.0...U........0D..U. .=0;09..`.H...E....0*0(..+.........https:/
02c0: /www.verisign.com/rpa0<..U...50301./.-.+http://SVRIntl-crl.veris
0300: ign.com/SVRIntl.crl0(..U.%.!0...+.........+.........`.H...B..0q.
0340: .+........e0c0$..+.....0...http://ocsp.verisign.com0;..+.....0..
0380: /http://SVRIntl-aia.verisign.com/SVRIntl-aia.cer0m..+........a0_
03c0: .].[0Y0W0U..image/gif0!0.0...+..............k...j.H.,{..0%.#http
0400: ://logo.verisign.com/vslogo.gif0...*.H............~N.v..f.g.4X..
0440: ........K.F..1..L....tosa.Mb*.F.kl......t....[(.............4...
0480: ...9.....4..N.v..N^....$...NJ7..........#.%.B..Mi....0...0......
04c0: ....x.H..[ q.....{..0...*.H........0_1.0...U....US1.0...U....Ver
0500: iSign, Inc.1705..U....Class 3 Public Primary Certification Autho
0540: rity0...970417000000Z..111024235959Z0..1.0...U....VeriSign Trust
0580: Network1.0...U....VeriSign, Inc.1301..U...*VeriSign Internation
05c0: al Server CA - Class 31I0G..U..._at_www.verisign.com/CPS Incorp.by
0600: Ref. LIABILITY LTD.(c)97 VeriSign0..0...*.H............0........
0640: .....}...9%.e+.......6;..Ll[...<sEU.....B..4....\.@%....2.ul....
0680: .V'qC.c.0>.(....;..MN9.\IZ.......p0.B..+Q.Z<:."O....S.O4....{o..
06c0: ......0..0...U....0.......0D..U. .=0;09..`.H...E....0*0(..+.....
0700: ....https://www.verisign.com/CPS04..U...-0+0).'.%.#http://crl.ve
0740: risign.com/pca3-g2.crl04..U.%.-0+..+.........+.........`.H...B..
0780: ..`.H...E...0...U........0...`.H...B........0...*.H............#
07c0: ]..$..v.j...F..j...f........US.>E...'.S8..|K+..J.pN.i.<.O....ZL.
0800: ........k..X..R.!...Z...Y{!z.j....:S..`.J.^...)...e......S.,..#
== Info: SSLv3, TLS handshake, Server key exchange (12):
<= Recv SSL data, 397 bytes (0x18d)
0000: .........=I[.,|.....y.....Q..^* d.Jy.p...Y..#.....0H../..< ..H..
0040: n.....>7.yNS'.a......\`D..=v.^.......<.N.......Q6.&.V...8..#.PP.
0080: .....k.....B.I...{..T..erO...~|K@,..X#....mm..i..V..8.O"..ve....
00c0: ...9....V..qd]...<3L.,....t...._at_T.(...S.!}.k.E.0......<.4.[..^.Q
0100: <.......&. ..t...*.+G`R...[U..(..)...w._..6.e......(..l3!.....(.
0140: ..Q..u]:l...e..($.E..Y.c3..`..j.$.......r..N....3A....^..)q.tQ.
0180: . ......c..u.
== Info: SSLv3, TLS handshake, Server finished (14):
<= Recv SSL data, 4 bytes (0x4)
0000: ....
== Info: SSLv3, TLS handshake, Client key exchange (16):
=> Send SSL data, 134 bytes (0x86)
0000: ......~...-.zt..........l6...~.4...P.5.....O.,j/{.r..~).I{{...S
0040: .U.....?...t;..+...E.O.G2.)4....4.=*!ko...e....l,..7,@..N*..m...
0080: ..&O..
== Info: SSLv3, TLS change cipher, Client hello (1):
=> Send SSL data, 1 bytes (0x1)
0000: .
== Info: SSLv3, TLS handshake, Finished (20):
=> Send SSL data, 16 bytes (0x10)
0000: ........9..Ab3!t
== Info: SSLv3, TLS change cipher, Client hello (1):
<= Recv SSL data, 1 bytes (0x1)
0000: .
== Info: SSLv3, TLS handshake, Finished (20):
<= Recv SSL data, 16 bytes (0x10)
0000: ..........f.|..o
== Info: SSL connection using DHE-RSA-AES256-SHA
== Info: Server certificate:
== Info: subject: /C=US/ST=New Hampshire/L=Lebanon/O=Somesite
Inc./OU=Web Services/OU=Terms of use at www.verisign.com/rpa
(c)05/CN=secure.somesite.com
== Info: start date: 2006-02-15 00:00:00 GMT
== Info: expire date: 2008-03-08 23:59:59 GMT
== Info: common name: secure.somesite.com (matched)
== Info: issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign
International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref.
LIABILITY LTD.(c)97 VeriSign
== Info: SSL certificate verify ok.
=> Send header, 298 bytes (0x12a)
0000: GET /sso2/getsignid.htm?signid=97bca6f415e3ae4d6fad42ed784077c1&
0040: path=www.somesite.com%2Fsso2&f=somesite HTTP/1.1
0078: User-Agent: curl/7.16.2 (i686-pc-linux-gnu) libcurl/7.16.2 OpenS
00b8: SL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
00dd: Host: secure.somesite.com
00f6: Accept: */*
0103: Referer: http://www.somesite.com
0128:
<= Recv header, 20 bytes (0x14)
0000: HTTP/1.1 302 Found
<= Recv header, 37 bytes (0x25)
0000: Date: Tue, 07 Aug 2007 08:33:58 GMT
<= Recv header, 70 bytes (0x46)
0000: Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.
0040: 9.7d
<= Recv header, 25 bytes (0x19)
0000: X-Powered-By: PHP/4.3.9
== Info: Added cookie Test_cookie_on_off="1" for domain
secure.somesite.com, path /sso2/, expire 0
<= Recv header, 34 bytes (0x22)
0000: Set-Cookie: Test_cookie_on_off=1
== Info: Added cookie sso_login="0244081f462bc7e87a634869ede760b2" for
domain secure.somesite.com, path /, expire 0
<= Recv header, 64 bytes (0x40)
0000: Set-Cookie: sso_login=0244081f462bc7e87a634869ede760b2; path=/
<= Recv header, 40 bytes (0x28)
0000: Expires: Thu, 19 Nov 1981 08:52:00 GMT
<= Recv header, 79 bytes (0x4f)
0000: Cache-Control: no-store, no-cache, must-revalidate, post-check=0
0040: , pre-check=0
<= Recv header, 18 bytes (0x12)
0000: Pragma: no-cache
<= Recv header, 52 bytes (0x34)
0000: Location: https://secure.somesite.com/sso2/login.htm
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 2 bytes (0x2)
0000:
== Info: Ignoring the response-body
<= Recv data, 5 bytes (0x5)
0000: 0
0003:
== Info: Connection #0 to host proxy1 left intact
== Info: Issue another request to this URL:
'https://secure.somesite.com/sso2/login.htm'
== Info: Re-using existing connection! (#0) with host proxy1
== Info: Connected to proxy1 (10.26.25.44) port 3128 (#0)
=> Send header, 386 bytes (0x182)
0000: GET /sso2/login.htm HTTP/1.1
001e: User-Agent: curl/7.16.2 (i686-pc-linux-gnu) libcurl/7.16.2 OpenS
005e: SL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
0083: Host: secure.somesite.com
009c: Accept: */*
00a9: Referer: https://secure.somesite.com/sso2/getsignid.htm?signid=97b
00e9: ca6f415e3ae4d6fad42ed784077c1&path=www.somesite.com%2Fsso2&f=
0129: somesite
0136: Cookie: sso_login=0244081f462bc7e87a634869ede760b2; Test_cookie_
0176: on_off=1
0180:
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 37 bytes (0x25)
0000: Date: Tue, 07 Aug 2007 08:33:59 GMT
<= Recv header, 70 bytes (0x46)
0000: Server: Apache/1.3.33 (Unix) PHP/4.3.9 mod_ssl/2.8.22 OpenSSL/0.
0040: 9.7d
<= Recv header, 25 bytes (0x19)
0000: X-Powered-By: PHP/4.3.9
== Info: Replaced cookie Test_cookie_on_off="1" for domain
secure.somesite.com, path /sso2/, expire 0
<= Recv header, 34 bytes (0x22)
0000: Set-Cookie: Test_cookie_on_off=1
== Info: Added cookie From="someusers" for domain secure.somesite.com,
path /sso2/, expire 0
<= Recv header, 26 bytes (0x1a)
0000: Set-Cookie: From=someusers
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 6 bytes (0x6)
0000: 10d8
<= Recv data, 4312 bytes (0x10d8)
0000:
0002: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
0042: "http://www.w3.org/TR/html4/loose.dtd">
006b: <html>
0073: <head>
007b: .<meta http-equiv="content-type" content="text/html;charset=iso-
00bb: 8859-1">
00c5: <title>Welcome to Somesite User Services!</title>
00f7: <!-- END HEAD OPEN -->
010f: <link rel="stylesheet" href="styles.css" type="text/css" media="
014f: all">
0156: <!-- BEGIN META TAG INFO -->
0174: .<meta name="keywords" content="">
0198: .<meta name="Description" content="Somesite Learning Center">
01d9: <!-- END META TAG INFO -->
01f5:
01f7:
01f9: <script language="JavaScript">
0219:
021b:
021d:
021f: </script>
022a:
022c: </head>
0235: <!-- END HEAD CLOSE -->
024e: <!-- BEGIN BODY OPEN -->
0268: <body>
0270:
0272: <div>
0279:
027b: <script language="javascript" type="text/javascript" src="http:
02bb: //www.somesite.com/local_scripts/headers/header.js"></script>
02f8:
02fa: <h1 id="sitetitle"><img src="http://www.somesite.com/img/somesite-lo
033a: go-new.gif" width="108" height="41"></h1>
0365: <div id="somesite-logo"><a href="http://www.somesite.com/"><img src="h
03a5: ttp://www.somesite.com/img/somesite-logo-new.gif" width="74" height="
03e5: 22" alt="www.somesite.com Home" title="www.somesite.com Home"/></a></d
0425: iv>
042a: <h1 id="usc-head"> <a href="http://www.somesite.com/" alt="fl
046a: uentusers.com home page" title="somesite.com home page"/>User
04aa: Services Center</a></h1>
04c5: <ul id="utility">
04d8:
04da: <li class="last">
04ef: <form name="ult" action="http://search.somesite.com/custom/flu
052f: sers/query.html" method="get">
054f: . <input type="hidden" name="col" value="someuser">
0585: . <input type="hidden" name="col" value="lcfd">
05b9: <input type="hidden" name="ht" value="0">
05ec: <input type="hidden" name="qp" value="">
061e: <input type="hidden" name="qs" value="">
0650: <input type="hidden" name="qc" value="someuser">
0688: <input type="hidden" name="pw" value="100%">
06be: <input type="hidden" name="ws" value="0">
06f1: <input type="hidden" name="qm" value="0">
0724: <input type="hidden" name="st" value="1">
0757: <input type="hidden" name="nh" value="10">
078b: <input type="hidden" name="lk" value="1">
07be: <input type="hidden" name="rf" value="0">
07f1: <input type="hidden" name="rq" value="0">
0824: <input type="hidden" name="si" value="1">
0857: ..<input type=text name="qt" size="25" value="Search" onFocus="
0897: clearform(this);">
08ac: </form>
08b9: </li>
08c3: </ul>
08ca:
08cc:
08ce: </div>
08d6: .
08d9: <p>
08de:
08e0: .
08e3: </p>
08ea:
08ec: .
08ef: <table border="0" cellpadding="0" cellspacing="0" id="two-col">
0930:
0933: <tr>
093b: <td colspan="2"></td>
0956: </tr>
095f: <tr>
0967: <td valign="top">
097e: .<div id="main">
0990: <h2> Welcome to Somesite's Online Support Resources!</h2>
09cf: <p> As a Somesite software user, you have 24 x 7 access to
0a0f: a host of product and support resources that enable you to make
0a4f: the most effective use of the software. This "users only" area p
0a8f: rovides you with the latest software releases, training resource
0acf: s that bring you up to speed on the latest releases, as well as
0b0f: various support resources to help you use the software effective
0b4f: ly and overcome any problems you may encounter. The support reso
0b8f: urces include answers to frequently asked questions, a knowledge
0bcf: base of solutions, the ability to request support from Somesite s
0c0f: taff, as well as discussion forums that enable you to interact w
0c4f: ith the broader Somesite software user community.</p>
0c84:
0c86: <p>If you have already registered for access to the sp
0cc6: ecific site that you
0cde: wish to visit, please log in below with the username
0d1e: and password you
0d33: received from Somesite. If not, please register now by
0d73: selecting the
0d85: appropriate "Register Now!" link on the right. </p>
0dc4: <h3>Already Registered? Login below:</h3>
0df9: <table border="0" cellpadding="3" cellspacing="0" id="
0e39: form-input">
0e47:
0e49: <tr>
0e5b:
0e5d: <td><form name="form1" method="post" action="check
0e9d: _user.htm">
0eaa:
0eac: <table border="0" cellspacing="2" cellpadding=
0eec: "2">
0ef2:
0ef4: <tr>
0f0e:
0f10: <td bgcolor="#eeeeee" class="formleft">Use
0f50: rname:</td>
0f5d:
0f5f: <td ><input type="text" name="userid"></td
0f9f: >
0fa2: </tr>
0fbd:
0fbf: <tr>
0fd9:
0fdb: <td bgcolor="#eeeeee" class="formleft">Pas
101b: sword:</td>
1028:
102a: <td><input type="password" name="passwd"><
106a: /td>
1070: </tr>
108b:
108d: <tr>
10a7:
10a9: <td> </td>
10d0:
10d2:
<= Recv data, 2 bytes (0x2)
0000:
<= Recv data, 2073 bytes (0x819)
0000: 80d
0005: <td><input type="submit" name="sub" value="Sign
0045: In"></td>
0050: </tr>
006b: </table>
0087:
0089: </form></td>
00a5: </tr>
00b8: </table>
00ca: .</div></td>
00d8: <td valign="top"><div id="right-col">
0103:
0105: <div class="box mg-bottom">
012a: <h3>Somesite User Services Center</h3>
015a: <p><a href="http://www.somesite.com/support/fuscreg.htm"
019a: >Register Now !</a></p>
01b3: </div>
01c3: <div class="box mg-bottom">
01e8: <h3>FloWizard Support Center</h3>
0215: <p><a href="http://www.flowizard.com/support/register.
0255: htm">Register Now !</a></p>
0272: </div>
0282: ..<div class="box mg-bottom">
02a1: <h3><b>Support Center</b></h3>
02df: <p><a href="http://www.somesite.com/software/somesiteforca
031f: tia/support/register.htm">Register Now !</a></p>
0351: </div>
0361: .
0366: </div></td>
0377: </tr>
0380: <tr>
0388: <td colspan="2">
039e: </td>
03a9: </tr>
03b2: <tr>
03ba: <td> </td>
03ca: </tr>
03d3: </table>
03dd: <div>
03e4: <p id="footer">Home |
0424: FAQs | <a hre
0464: f="http://clarify.somesite.com/eSupport/">Online Support</a> | <a
04a4: href="http://www.learningcfd.com/login/index.htm"> Training</a>
04e4: | <a href="http://board.somesite.com/cgi-bin/ubb/Ultimate.cgi">For
0524: ums</a> | <a href="http://www.somesite.com/fsdc/">Downloads</
0564: a> | <a href="http://www.somesite.com/vscfdlit/">Literatu
05a4: re</a>
05ac: . <br>
05b6: . Copyright
05f6: | <a href="http://www.somesite.com/privacy/index.htm">Privacy Stat
0636: ement</a> | <a href="http://search.somesite.com/custom/someusers/que
0676: ry.html?col=someuser&col=lcfd&ht=0&qp=&qt=&fin
06b6: d.x=25&find.y=4&qs=&qc=someuser&pw=100%25&ws=0
06f6: &qm=0&st=1&nh=10&lk=1&rf=0&rq=0&si=1
0736: ">Search</a> | <a href="http://www.somesite.com/contactus.htm
0776: ">Contact Us</a>.
0789: . <br>
0793: Somesite Inc. is a wholly owned subsidiary of <a href="http://
07d3: www.somesite.com/">Somesite, Inc</a>.</p></div>
07fe:
0800: </body>
0809: </html>
0812:
0814: 0
0817:
== Info: Connection #0 to host proxy1 left intact
== Info: Closing connection #0
== Info: SSLv3, TLS alert, Client hello (1):
=> Send SSL data, 2 bytes (0x2)
0000: ..
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ON USING "curl" IN COMMAND LINE, the content of "filecurl" is
/********* Sample code generated by the curl command line tool **********
* Lines with [REMARK] below might need to be modified to make this code
* usable. Add appropriate error code checking where appropriate.
* Compile this with a suitable header include path. Then link with
* libcurl.
* If you use any *_LARGE options, make sure your compiler figure
* out the correct size for the curl_off_t variable.
************************************************************************/
#define _FILE_OFFSET_BITS 64 /* for curl_off_t magic */
#include <curl/curl.h>
int main(int argc, char *argv[])
{
CURLcode ret;
CURL *hnd = curl_easy_init();
/* curl_easy_setopt(hnd, CURLOPT_WRITEDATA, 0xbfe93260); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, 0x8049da8); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_READDATA, 0xbfe93148); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_READFUNCTION, 0x8049e94); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_IOCTLDATA, 0xbfe93148); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_IOCTLFUNCTION, 0x8049e60); [REMARK] */
curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)-1);
curl_easy_setopt(hnd, CURLOPT_URL, "www.somesite.com");
curl_easy_setopt(hnd, CURLOPT_PROXY, "proxy1:3128");
curl_easy_setopt(hnd, CURLOPT_HEADER, 0);
curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1024);
curl_easy_setopt(hnd, CURLOPT_NOBODY, 0);
curl_easy_setopt(hnd, CURLOPT_FAILONERROR, 0);
curl_easy_setopt(hnd, CURLOPT_UPLOAD, 0);
curl_easy_setopt(hnd, CURLOPT_FTPLISTONLY, 0);
curl_easy_setopt(hnd, CURLOPT_FTPAPPEND, 0);
curl_easy_setopt(hnd, CURLOPT_NETRC, 0);
curl_easy_setopt(hnd, CURLOPT_FOLLOWLOCATION, 8388608);
curl_easy_setopt(hnd, CURLOPT_UNRESTRICTED_AUTH, 0);
curl_easy_setopt(hnd, CURLOPT_TRANSFERTEXT, 0);
curl_easy_setopt(hnd, CURLOPT_USERPWD, NULL);
curl_easy_setopt(hnd, CURLOPT_PROXYUSERPWD, NULL);
curl_easy_setopt(hnd, CURLOPT_RANGE, NULL);
/* curl_easy_setopt(hnd, CURLOPT_ERRORBUFFER, 0xbfe93320); [REMARK] */
curl_easy_setopt(hnd, CURLOPT_TIMEOUT, 0);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS,
"userid=xxxxxx%40aa.bb.cc&passwd=yyyyyy&sub=Sign+In");
curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE, -1);
/* curl_easy_setopt(hnd, CURLOPT_REFERER, 0x9e663a8); [REMARK] */
curl_easy_setopt(hnd, CURLOPT_AUTOREFERER, 16);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.16.2
(i686-pc-linux-gnu) libcurl/7.16.2 OpenSSL/0.9.7a zlib/1.2.1.2
libidn/0.5.6");
curl_easy_setopt(hnd, CURLOPT_FTPPORT, NULL);
curl_easy_setopt(hnd, CURLOPT_LOW_SPEED_LIMIT, 0);
curl_easy_setopt(hnd, CURLOPT_LOW_SPEED_TIME, 0);
curl_easy_setopt(hnd, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)0);
curl_easy_setopt(hnd, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)0);
curl_easy_setopt(hnd, CURLOPT_RESUME_FROM_LARGE, (curl_off_t)0);
curl_easy_setopt(hnd, CURLOPT_COOKIE, NULL);
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, NULL);
curl_easy_setopt(hnd, CURLOPT_SSLCERT, NULL);
curl_easy_setopt(hnd, CURLOPT_SSLCERTTYPE, NULL);
curl_easy_setopt(hnd, CURLOPT_SSLKEY, NULL);
curl_easy_setopt(hnd, CURLOPT_SSLKEYTYPE, NULL);
curl_easy_setopt(hnd, CURLOPT_SSLKEYPASSWD, NULL);
curl_easy_setopt(hnd, CURLOPT_SSH_PRIVATE_KEYFILE, NULL);
curl_easy_setopt(hnd, CURLOPT_SSH_PUBLIC_KEYFILE, NULL);
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 2);
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 1);
curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50);
curl_easy_setopt(hnd, CURLOPT_CRLF, 0);
curl_easy_setopt(hnd, CURLOPT_QUOTE, NULL);
curl_easy_setopt(hnd, CURLOPT_POSTQUOTE, NULL);
curl_easy_setopt(hnd, CURLOPT_PREQUOTE, NULL);
curl_easy_setopt(hnd, CURLOPT_WRITEHEADER, NULL);
curl_easy_setopt(hnd, CURLOPT_COOKIEFILE, "/tmp/cookie");
curl_easy_setopt(hnd, CURLOPT_COOKIEJAR, "/tmp/cookie");
curl_easy_setopt(hnd, CURLOPT_COOKIESESSION, 0);
curl_easy_setopt(hnd, CURLOPT_SSLVERSION, 0);
curl_easy_setopt(hnd, CURLOPT_TIMECONDITION, 0);
curl_easy_setopt(hnd, CURLOPT_TIMEVALUE, 0);
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, NULL);
/* curl_easy_setopt(hnd, CURLOPT_STDERR, 0xd34460); [REMARK] */
curl_easy_setopt(hnd, CURLOPT_HTTPPROXYTUNNEL, 0);
curl_easy_setopt(hnd, CURLOPT_INTERFACE, NULL);
curl_easy_setopt(hnd, CURLOPT_KRB4LEVEL, NULL);
curl_easy_setopt(hnd, CURLOPT_TELNETOPTIONS, NULL);
curl_easy_setopt(hnd, CURLOPT_RANDOM_FILE, NULL);
curl_easy_setopt(hnd, CURLOPT_EGDSOCKET, NULL);
curl_easy_setopt(hnd, CURLOPT_CONNECTTIMEOUT, 0);
/* curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, 0x804a140); [REMARK] */
/* curl_easy_setopt(hnd, CURLOPT_DEBUGDATA, 0xbfe93420); [REMARK] */
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1);
curl_easy_setopt(hnd, CURLOPT_ENCODING, NULL);
curl_easy_setopt(hnd, CURLOPT_FTP_CREATE_MISSING_DIRS, 0);
curl_easy_setopt(hnd, CURLOPT_IPRESOLVE, 0);
curl_easy_setopt(hnd, CURLOPT_FTP_ACCOUNT, NULL);
curl_easy_setopt(hnd, CURLOPT_IGNORE_CONTENT_LENGTH, 0);
curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 0);
curl_easy_setopt(hnd, CURLOPT_FTP_FILEMETHOD, 0);
curl_easy_setopt(hnd, CURLOPT_FTP_ALTERNATIVE_TO_USER, NULL);
curl_easy_setopt(hnd, CURLOPT_SSL_SESSIONID_CACHE, 1);
ret = curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
}
/* */
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2007-08-08