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:
commit
4da27ca405
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user