in reply to parsing links from java applets

Java applets are compiled code. The URL of the button is probably dynamically created -- I presume that's why it was made as an applet in the first place -- so the straightforward solution is to disassemble/decompile the applet and see what it's doing.

An alternative is to find a tool that clicks the button (maybe by sending keystrokes to the applet) and check which site gets loaded.

If site is loaded within the applet (as oppose to being loaded by the browser at the request of the applet), you could write your own security manager. I think all it takes is to write a subclass of java.lang.SecurityManager which overrides checkPermission with a method that looks for permissions of type java.net.SocketPermission. You could even throw a security exception if you don't want the site to actually be loaded.

Replies are listed 'Best First'.
Re: parsing links from java applets
by mkurtis (Scribe) on Nov 17, 2004 at 04:46 UTC
    do you happen to know the name of a tood that sends keystrokes? I did a cpan search for java.lang.securitymanager and it didnt return a module, do you know the actual module to use. a search for security in the java module didnt return anything either. By the way, firefox can view the source of the java applets by right clicking and hitting view source on the applet. it returns it in the html that is generated on the page. Is there a way for perl to do this?

    thanks

      No, I don't know of such a tool.

      SecurityManager is part of Java.

      "By the way, firefox can view the source of the java applets". I strongly doubt that. Have you been talking about JavaScript? Java and JavaScript are as different as Perl and C++.

        i guess it could have been javascript. I just assumed since it called a file for its code that it was a java applet. firefox can still view the html generated by it though, but only by right clicking on the generated area. Is there someway i can view the sourceof that area with perl?

        thanks