mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-01 18:00:00 -07:00
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.
15 lines
243 B
Rust
15 lines
243 B
Rust
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();
|
|
} |