Script App for SSL VPN Link

This is a discussion on Script App for SSL VPN Link within the C++ Programming forums, part of the General Programming Boards category; Hi all, It has been about 5 or 6 years since I've done any coding, and then it was simple ...

  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    7

    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,
    Regards,
    Andy

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    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 http://openvpn.sourceforge.net/ (though i know you mentioned you already have source for a vpn client)

  3. #3
    Registered User
    Join Date
    Nov 2004
    Posts
    7
    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.
    Thank,
    --Andy
    Attached Files Attached Files

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

  5. #5
    Registered User
    Join Date
    Nov 2004
    Posts
    7
    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:
    Code:
    	// 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, 
    												LOGIN_RES,
    												NULL,
    												1,
    												NULL,
    												NULL,
    												reqFlags);
    	
    	try{
    		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.
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    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, 07:12 AM
  3. destructor with a link list
    By Bones in forum C++ Programming
    Replies: 1
    Last Post: 09-24-2003, 01: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21