diff -r 16e6b1683c63 -r 8cd92042fb8b sap-vpn.pl --- a/sap-vpn.pl Tue Jan 06 07:27:55 2009 +0000 +++ b/sap-vpn.pl Tue Jan 06 09:55:50 2009 +0100 @@ -218,6 +218,7 @@ unless $response->is_success; $response = $response->as_string; + # ? $cookies->set_cookie(0, MRHSession => $sessionid, "/", $opt_host, 443, 1, 0, 10, 0, {}); } # We can then parse the response for the MRHSession Cookie, which contains our @@ -228,8 +229,6 @@ $sessionid = $1; verbose "% session id ${sessionid}\n"; - $cookies->set_cookie(0, MRHSession => $sessionid, "/", $opt_host, 443, 1, 0, 10, 0, {}); - #warn $cookies->as_string; ### ### STEP 3 :: Create the SSL VPN tunnel. @@ -240,8 +239,7 @@ # Now that we are authenticated and have a valid SessionID, we must request # specific pages/objects in order to initiate a SSL VPN tunnel. Before we do # this, let's determine the resource locator for our Network Access favorite. - #if (!$use_lwp) { - if (1) { + if (!$use_lwp) { $request = "GET /vdesk/vpn/index.php3?outform=xml HTTP/1.0\r\n" . "Cookie: MRHSession=${sessionid}\r\n" . "\r\n"; $response = qx(echo "${request}" | ${openssl} 2>/dev/null); @@ -265,8 +263,6 @@ $favorite = $1; verbose "% favorite ${favorite}\n"; - exit; - # We're all set! Let's visit the necessary pages/objects to notify FirePass # that we wish to open a SSL VPN tunnel. foreach my $uri ("/vdesk/", "/vdesk/vpn/connect.php3?Z=0,${favorite}",) {