Thread: Script App for SSL VPN Link

  1. #1
    Registered User
    Join Date
    Nov 2004

    Script App for SSL VPN Link

    Hi all,
    It has been about 5 or 6 years since I've done any coding, and then it was simple C coding for cleaning up y2k messes... I just started a new job and they want me to script a login to an SSL VPN appliance and I think I may be in over my head.

    I have the source code for an application that runs on the command line and accepts arguments for the URL, Login Name, and Password. Right now the application launches an IE browser window after login that brings up the "launchpad", or user-interface, for the user. The launchpad is just a webpage with links to the applications available to the user. The user clicks one and it launches a JNLP file with Javaw to create an SSL tunnel solely for that application.

    What I want to do, is instead of having the user select the application, I want it to be specified as a paramater of the script and have it automatically grabbed, and run.

    The makers of the appliance have supplied me with a document that gives me the relative path of the launchpad, I just need to get the document, pick the application, save the file it links, then run that file with java... Easier said than done.

    I copied the section of code that completes the login and attempted to modify it to pull the application URL and now I can't get the code to compile.

    Rather than post a huge section of code, or a mammoth error log from the compiler, I thought I'd ask what would be the most useful, or if anyone would like to volunteer to assist via e-mail (I'll send the whole project). I'd like to figure this out so that I can modify it in the event of neccessity, but I'm running into time constraints and need to have this up and running.

    I know this is kind of long, thanks in advance for any help,

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Without seeing some source or a snippit of the error its hard to tell what your problem is. the best i can think of is to point you here (though i know you mentioned you already have source for a vpn client)

  3. #3
    Registered User
    Join Date
    Nov 2004
    Sorry, was trying to cut down on the muss...
    I'll attach the HTML error log...

    I changed the extension to .txt so that it would upload.

  4. #4
    Registered User
    Join Date
    Nov 2004
    Figured it out.

  5. #5
    Registered User
    Join Date
    Nov 2004
    OK, new problem along same lines...

    Code is supposed to pull a page into a buffer so that I can pull out the weblinks. Unfortunately the webpage is "sensing" that I don't have Java and isn't giving me the page with the links I need. Is there a way I can make it think that I have java so that the links show up?

    Here is the code that calls the page:
    	// open HTTP connection and send request.
    	CInternetSession session;
    	CHttpConnection* pConnection = session.GetHttpConnection((LPCTSTR) sErver, (INTERNET_PORT) sPort);
    	CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST, 
    		pFile->SendRequest(strHeaders, (LPVOID)(LPCTSTR)strFormData, strFormData.GetLength());
    		int len = pFile->Read(respBuf, BUFSIZE);
    		respBuf[len] = '\0';
    		if (verbose) {
    			fprintf(stdout, "\nReceived Data from Server: \n\n");
    			fprintf(stdout, "\t%s\n", respBuf);
    	} catch (CInternetException *e) {
    		e->GetErrorMessage(respBuf, BUFSIZE);
    		fprintf(stderr, "Fatal Error in sending HTTP request...\n%s\n", respBuf);
    		retCode = FAILURE;
    	return retCode;
    the output from the website is attached as a txt file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  2. what's wrong...
    By dreamkk in forum C Programming
    Replies: 9
    Last Post: 10-09-2003, 06:12 AM
  3. destructor with a link list
    By Bones in forum C++ Programming
    Replies: 1
    Last Post: 09-24-2003, 12:01 PM
  4. Undefined Structure in Link List
    By _Cl0wn_ in forum C Programming
    Replies: 1
    Last Post: 03-22-2003, 05:57 PM
  5. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM