mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-24 18:16:24 +01:00
cleanup
This commit is contained in:
parent
6cffe0d3e2
commit
2dc21da562
java/meterpreter/meterpreter/src/main/java/com/metasploit/meterpreter
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user