Hello everyone,
I'm Roberto and I'm new on this forum.
I tend not to bother people, but I've tried everything I could and I must admit that I'm out of ideas at this point.
What I need to accomplish: I need to automatically connect using a Juniper Network Connection 8.0 on a Windows 2009 server.
What I tried to do:
- The most obvious solution was to use the nclauncher executable. That however raised the first issue. The https certificate that the server provides when I launch said executable with the url, username, password and realm options is both expired and relative to a different website, therefore the security warning pops up, saying that 2 out of 3 security checks are not met. Connecting manually would simply mean pressing Yes, doing it automatically was more complex. I managed to make a VBSCRIPT that presses ENTER (and then Y to get past the following popup). So far so good. Then came the issue that this would only work when there is a terminal opened on the windows server, otherwise there would be no popup to be displayed, and the script wouldn't get past it.
- Solution 2 was to use cURL and/or a Java URLHttpRequest piece of code that I wrote. cURL has an option to ignore certificate issues, and I override a few pieces of code to accomplish the same in Java. So far so good. Now the problem was that I could log in making a POST request to the log in page (https://ip/dana-na/auth/url_default/login.cgi), I managed to keep the same session_id for the following GET call that, in my hopes, would have fired the Network Connection client, problem is, that isn't getting fired. I obtained the url from the START button of the website that I see after the authentication page (https://ip/dana/nc/ncrun.cgi?launch_nc=1), and hoped that calling a GET on it would "simulate" the click of the START button, but it doesn't
I'm now out of ideas, you guys are my only hope.
Thank you so much,
Roberto