1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-02 11:36:22 +01:00

Land #117, fix check_root on android 6.0 and up

This commit is contained in:
Brent Cook 2016-09-15 21:04:08 -05:00
commit 4da27ca405
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96

View File

@ -53,8 +53,8 @@ public class check_root_android implements Command {
private static boolean canExecuteCommand(String command) {
boolean executedSuccesfully;
try {
Runtime.getRuntime().exec(command);
executedSuccesfully = true;
Process process = Runtime.getRuntime().exec(command);
executedSuccesfully = process.waitFor() == 0;
} catch (Exception e) {
executedSuccesfully = false;
}