How can I extract data from a Java applet (inside the browser)

Paulo Bueno picture Paulo Bueno · Aug 4, 2011 · Viewed 8.1k times · Source

Well, well, here we go...

We have a java applet running on a regular browser (ff4+ or ie5+).

I do NOT have access to the java code / servlet. Nor even to the server.

I NEED to send/retrieve data from this applet. This means i must emulate an user onto it by clicking buttons and filling form's textboxes and also return data (after server response) wich ll be inside textboxes.

So the technologies avaibles to be used are C, VB, .NET (webbrowser object mainly), PHP (cUrl avaible), JavaScript, Sniffing the browser/server communication using Fiddler.

We really need this. But if thats impossible so we may have to know also. The data is owned by my company so no copyrigth is inflicted.

Also i'm open to non traditional solution such as saving the html as an image and then retrieve the data using some OCR software...

Well so any suggestion or pointing directions would be gratefully appreciated.

Thx

Paulo Bueno.

Answer

Paul Gregoire picture Paul Gregoire · Aug 12, 2011

Having to emulate a user browsing is wrought with problems and i would suggest an alternate route, if its feasible. These are the steps I would take:

  1. Grab the applet class or jar from my cache (anyone accessing the page / applet can do this).
  2. Decompile the code into Java source (Using jad or other preferred tool)
  3. Review the process with which the applet communicates to the service
  4. Write an application to submit my data to the service that the applet connects to and handle any responses just as the applet would.