http://www.everydaylife.amdigital.co.uk/ GET / HTTP/1.1 Host: www.everydaylife.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: Thu, 06 Dec 2007 10:19:21 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Location: /login.aspx?ReturnUrl=%2findex.aspx Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 152 ---------------------------------------------------------- http://www.everydaylife.amdigital.co.uk/login.aspx?ReturnUrl=%2findex.aspx GET /login.aspx?ReturnUrl=%2findex.aspx HTTP/1.1 Host: www.everydaylife.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: Thu, 06 Dec 2007 10:19:21 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Location: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx Set-Cookie: ASP.NET_SessionId=tjfxz255rcn0ei55nskjfl55; path=/ Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 267 ---------------------------------------------------------- http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx GET /Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx HTTP/1.1 Host: secure.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: Thu, 06 Dec 2007 10:19:22 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true Set-Cookie: ASP.NET_SessionId=g534qbaix4gqne551mr1gs45; path=/; HttpOnly Set-Cookie: AMPCAM=cam; path=/ Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 291 ---------------------------------------------------------- http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true GET /Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true HTTP/1.1 Host: secure.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: ASP.NET_SessionId=g534qbaix4gqne551mr1gs45; AMPCAM=cam HTTP/1.x 200 OK Date: Thu, 06 Dec 2007 10:19:23 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 9317 ---------------------------------------------------------- http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true#1f3e7d GET /Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true HTTP/1.1 Host: secure.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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 Referer: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true Cookie: ASP.NET_SessionId=g534qbaix4gqne551mr1gs45; AMPCAM=cam HTTP/1.x 200 OK Date: Thu, 06 Dec 2007 10:19:23 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 9317 ---------------------------------------------------------- http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true POST /Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true HTTP/1.1 Host: secure.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true Cookie: ASP.NET_SessionId=g534qbaix4gqne551mr1gs45; AMPCAM=cam Content-Type: application/x-www-form-urlencoded Content-Length: 433 __EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUKLTIxOTM1NjQ3Nw9kFgICAQ9kFgICAw8PFgIeC05hdmlnYXRlVXJsBWRodHRwOi8vYXV0aC5hdGhlbnNhbXMubmV0Lz9hdGhfcmV0dXJsPWh0dHAlM2ElMmYlMmZzZWN1cmUuYW1kaWdpdGFsLmNvLnVrJTJmbG9naW4uYXNweCZhdGhfZHNwaWQ9QU1QZGRk2Bb6XOr65gVrMfaRFicTepH4QYQ%3D&UserNameTextBox=EXLIBRIS&PasswordTextbox=EXLIBRIS&LoginButton=Login&__EVENTVALIDATION=%2FwEWBALbmLD7DgLw2N3fDgKi9%2FChAwL%2BjNCfD2F8eUswa7S9vprVTL2rvpalIrUP HTTP/1.x 302 Found Date: Thu, 06 Dec 2007 10:20:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: http://www.everydaylife.amdigital.co.uk/index.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&sessionENC=Nfb%2ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%2bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%3d&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx Set-Cookie: secure.root=AC78A146FA8D23827CAA1445F0CE905249CBBD1FAF049565BFCAE6EB1E88592E7CAAB601986702A994CE27AB24B63F8A0F4C236BBB21CE353D37675F217FA4E6543DA341A37DD6042B85E5A1F3A5FE12A4A3A3E9DE0020BB6F81795DD1F61EBA5558E5711205BC5C32C705D12DE93006; path=/; HttpOnly Set-Cookie: camlogintoken=8f90be72-817c-4679-aefd-7542fa6e808b; domain=.amdigital.co.uk; expires=Thu, 06-Dec-2007 10:21:36 GMT; path=/ Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 407 ---------------------------------------------------------- http://www.everydaylife.amdigital.co.uk/index.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&sessionENC=Nfb%2ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%2bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%3d&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx GET /index.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&sessionENC=Nfb%2ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%2bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%3d&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx HTTP/1.1 Host: www.everydaylife.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true Cookie: ASP.NET_SessionId=tjfxz255rcn0ei55nskjfl55; camlogintoken=8f90be72-817c-4679-aefd-7542fa6e808b HTTP/1.x 302 Found Date: Thu, 06 Dec 2007 10:20:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Location: /login.aspx?ReturnUrl=%2findex.aspx%3fsessionID%3dtjfxz255rcn0ei55nskjfl55%26sessionENC%3dNfb%252ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%252bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%253d%26originalURL%3dhttp%253a%252f%252fwww.everydaylife.amdigital.co.uk%252findex.aspx&sessionID=tjfxz255rcn0ei55nskjfl55&sessionENC=Nfb%2ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%2bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%3d&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 654 ---------------------------------------------------------- http://www.everydaylife.amdigital.co.uk/login.aspx?ReturnUrl=%2findex.aspx%3fsessionID%3dtjfxz255rcn0ei55nskjfl55%26sessionENC%3dNfb%252ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%252bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%253d%26originalURL%3dhttp%253a%252f%252fwww.everydaylife.amdigital.co.uk%252findex.aspx&sessionID=tjfxz255rcn0ei55nskjfl55&sessionENC=Nfb%2ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%2bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%3d&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx GET /login.aspx?ReturnUrl=%2findex.aspx%3fsessionID%3dtjfxz255rcn0ei55nskjfl55%26sessionENC%3dNfb%252ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%252bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%253d%26originalURL%3dhttp%253a%252f%252fwww.everydaylife.amdigital.co.uk%252findex.aspx&sessionID=tjfxz255rcn0ei55nskjfl55&sessionENC=Nfb%2ftuRFpS6Xd2N0ylolleZ4z9Zqn6SFYF%2bk6Pa0fMZY4Q31JvifZEq5BtD6f6ZqBbDptegoCj2HtkI7vWpMtmN6DGQSBfWsIQsWDVI8KQI%3d&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx HTTP/1.1 Host: www.everydaylife.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true Cookie: ASP.NET_SessionId=tjfxz255rcn0ei55nskjfl55; camlogintoken=8f90be72-817c-4679-aefd-7542fa6e808b HTTP/1.x 302 Found Date: Thu, 06 Dec 2007 10:20:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Location: http://www.everydaylife.amdigital.co.uk/index.aspx Set-Cookie: Login=83BB09A8C256DEB5FA12F7B0BCCFF564017D18E83D4A5F4F9905A70981B4B513350D92164ABA56340F9AEDB0B6438A36E6FE926C35A522980CB2FBA332D185494C120C81251F6B4698F6D8101747267BA9CFB143A5EB12527DB4DE1FF9857A27D6C4341D0981F92F644A3F8E6FC0E422CB4294066D10B0C2400209719FA5B1D9; path=/ Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 167 ---------------------------------------------------------- http://www.everydaylife.amdigital.co.uk/index.aspx GET /index.aspx HTTP/1.1 Host: www.everydaylife.amdigital.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 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: http://secure.amdigital.co.uk/Login.aspx?sessionID=tjfxz255rcn0ei55nskjfl55&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx&cookiesTesting=true Cookie: ASP.NET_SessionId=tjfxz255rcn0ei55nskjfl55; camlogintoken=8f90be72-817c-4679-aefd-7542fa6e808b; Login=83BB09A8C256DEB5FA12F7B0BCCFF564017D18E83D4A5F4F9905A70981B4B513350D92164ABA56340F9AEDB0B6438A36E6FE926C35A522980CB2FBA332D185494C120C81251F6B4698F6D8101747267BA9CFB143A5EB12527DB4DE1FF9857A27D6C4341D0981F92F644A3F8E6FC0E422CB4294066D10B0C2400209719FA5B1D9 HTTP/1.x 200 OK Date: Thu, 06 Dec 2007 10:20:46 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 9611 ---------------------------------------------------------- #### #!/exlibris/metalib/m4_8/product/bin/perl use strict; use LWP::UserAgent; use URI::Escape; use HTTP::Cookies; my ($session,$view_state,$t,$d,$event_validation,$new_view_state,$session_enc,$login); my $ua = new LWP::UserAgent; $ua->cookie_jar(HTTP::Cookies->new()); #### First call - go to the home page and get the initial session ID my $search_command = "http://www.everydaylife.amdigital.co.uk"; my $req = new HTTP::Request('GET',$search_command); my $res = $ua->request($req); my $response = $res->headers_as_string(); my $response .= $res->content; print "Cookies after 1st transaction:".$ua->cookie_jar->as_string."\n"; ########################################################################## ##### Parse a few parameters for the following requests' authentication if($response =~ /action="Login.aspx\?sessionID=(.*?)&originalURL=/){ $session = $1; } if($response =~ /id="__VIEWSTATE"\s*value="(.*?)"/){ $view_state = $1; } if($response =~ /id="__EVENTVALIDATION" value="(.*?)"/){ $event_validation = $1; } ########################################################################### #### Second call - use the parameters we found and perform a POST request ##The search address my $search_command = "http://secure.amdigital.co.uk/Login.aspx?sessionID=$session&originalURL=http%3a%2f%2fwww.everydaylife.amdigital.co.uk%2findex.aspx"; ##The POST content my $content = "__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=$view_state&UserNameTextBox=EXLIBRIS&PasswordTextbox=EXLIBRIS&LoginButton=Login&__EVENTVALIDATION=$event_validation"; ##The headers my $header = new HTTP::Headers( 'Accept-Language' => 'en-us', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'Connection' => 'Keep-Alive', 'Cache-Control' => 'no-cache', ); $req = new HTTP::Request('POST',$search_command,$header,$content); $res = $ua->request($req); ##The cookie jar print "Cookies after 2nd transaction:".$ua->cookie_jar->as_string."\n";