Skip to content

Module: Get Internal IP (Java)

bcoles edited this page Mar 24, 2019 · 2 revisions

Summary

  • Objective: Get the Internal IP of the hooked system
  • Date: June 2012
  • Authors: antisnatchor
  • Browsers: IE, Opera, Firefox (User is notified on Chrome and Safari)
  • Code

Note that modern Java (as of Java 7u51) will outright refuse to execute unsigned Java applets, and will also reject self-signed Java applets unless they're added to the exception list.

Internal Working

This applet is adapted from Lars Kindermann applet and basically just use the Java Socket class to get the host address:

        try {
            String str1 = new Socket(str2, i).getLocalAddress().getHostAddress();
            if (!str1.equals("255.255.255.255")) obj = str1;
        } catch (SecurityException localSecurityException) {
            obj = "FORBIDDEN";
        } catch (Exception localException1) {
            obj = "ERROR";
        }

Screenshots

References

Clone this wiki locally