1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-08 14: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) { private static boolean canExecuteCommand(String command) {
boolean executedSuccesfully; boolean executedSuccesfully;
try { try {
Runtime.getRuntime().exec(command); Process process = Runtime.getRuntime().exec(command);
executedSuccesfully = true; executedSuccesfully = process.waitFor() == 0;
} catch (Exception e) { } catch (Exception e) {
executedSuccesfully = false; executedSuccesfully = false;
} }