mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-27 07:59:59 -07:00
Add bootstrapping support
Add tools for launching a root shell on the device, and for sending serial commands to the device. Extend the make.sh script to push those and configure a root shell. Commands can now be executed as root via: adb shell rootshell -c \"touch /tmp/test\" allowing automatic configuration of the tooling.
This commit is contained in:
15
rootshell/src/main.rs
Normal file
15
rootshell/src/main.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use std::process::Command;
|
||||
use std::os::unix::process::CommandExt;
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let mut args = env::args();
|
||||
|
||||
// discard argv[0]
|
||||
let _ = args.next();
|
||||
Command::new("/bin/bash")
|
||||
.args(args)
|
||||
.uid(0)
|
||||
.gid(0)
|
||||
.exec();
|
||||
}
|
||||
Reference in New Issue
Block a user