diff --git a/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/Utils.java b/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/Utils.java index a4d6ddf3..2270b144 100644 --- a/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/Utils.java +++ b/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/Utils.java @@ -17,13 +17,13 @@ public class Utils { public static String runCommand(String command) throws IOException { Process process = Runtime.getRuntime().exec(command); BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream())); - StringBuilder stringBuffer = new StringBuilder(); + StringBuilder stringBuilder = new StringBuilder(); String line; while ((line = br.readLine()) != null) { - stringBuffer.append(line); - stringBuffer.append('\n'); + stringBuilder.append(line); + stringBuilder.append('\n'); } - return stringBuffer.toString(); + return stringBuilder.toString(); } public static String getHostname() { diff --git a/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/core/core_machine_id.java b/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/core/core_machine_id.java index f38349de..810a575c 100644 --- a/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/core/core_machine_id.java +++ b/java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter/core/core_machine_id.java @@ -17,11 +17,9 @@ public class core_machine_id implements Command { private static String machine_id; private String getSerial() throws IOException { - StringBuilder stringBuffer = new StringBuilder(); - stringBuffer.append(Utils.runCommand("getprop ro.serialno").trim()); - stringBuffer.append(Utils.runCommand("getprop ro.product.brand").trim()); - stringBuffer.append(Utils.runCommand("getprop ro.product.model").trim()); - return stringBuffer.toString(); + return Utils.runCommand("getprop ro.serialno").trim() + + Utils.runCommand("getprop ro.product.brand").trim() + + Utils.runCommand("getprop ro.product.model").trim(); } private String getHDLabel() {