mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-29 18:28:11 -07:00
+1
-1
@@ -55,7 +55,7 @@ async fn run_server(
|
|||||||
.route("/", get(|| async { Redirect::permanent("/index.html") }))
|
.route("/", get(|| async { Redirect::permanent("/index.html") }))
|
||||||
.route("/*path", get(serve_static))
|
.route("/*path", get(serve_static))
|
||||||
.with_state(state);
|
.with_state(state);
|
||||||
let addr = SocketAddr::from(([127, 0, 0, 1], config.port));
|
let addr = SocketAddr::from(([0, 0, 0, 0], config.port));
|
||||||
let listener = TcpListener::bind(&addr).await.unwrap();
|
let listener = TcpListener::bind(&addr).await.unwrap();
|
||||||
task_tracker.spawn(async move {
|
task_tracker.spawn(async move {
|
||||||
info!("The orca is hunting for stingrays...");
|
info!("The orca is hunting for stingrays...");
|
||||||
|
|||||||
+11
-10
@@ -1,11 +1,12 @@
|
|||||||
cd serial
|
#!/bin/env bash
|
||||||
cargo build_pc
|
|
||||||
cd ..
|
set -e
|
||||||
cd rootshell
|
|
||||||
cargo build --release
|
cargo build --bin serial
|
||||||
cd ..
|
cargo build --bin rootshell --target armv7-unknown-linux-gnueabihf --release
|
||||||
|
|
||||||
# Force a switch into the debug mode to enable ADB
|
# Force a switch into the debug mode to enable ADB
|
||||||
target/x86_64-unknown-linux-gnu/debug/serial AT
|
cargo run --bin serial -- AT
|
||||||
echo -n "adb enabled, waiting for reboot"
|
echo -n "adb enabled, waiting for reboot"
|
||||||
until adb shell true 2> /dev/null
|
until adb shell true 2> /dev/null
|
||||||
do
|
do
|
||||||
@@ -15,11 +16,11 @@ done
|
|||||||
echo
|
echo
|
||||||
echo "it's alive!"
|
echo "it's alive!"
|
||||||
adb push target/armv7-unknown-linux-gnueabihf/release/rootshell /tmp/
|
adb push target/armv7-unknown-linux-gnueabihf/release/rootshell /tmp/
|
||||||
target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=mv /tmp/rootshell /bin/rootshell"
|
cargo run --bin serial -- "AT+SYSCMD=mv /tmp/rootshell /bin/rootshell"
|
||||||
sleep 1
|
sleep 1
|
||||||
target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=chown root /bin/rootshell"
|
cargo run --bin serial -- "AT+SYSCMD=chown root /bin/rootshell"
|
||||||
sleep 1
|
sleep 1
|
||||||
target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=chmod 4755 /bin/rootshell"
|
cargo run --bin serial -- "AT+SYSCMD=chmod 4755 /bin/rootshell"
|
||||||
echo "we have root!"
|
echo "we have root!"
|
||||||
adb shell /bin/rootshell -c id
|
adb shell /bin/rootshell -c id
|
||||||
adb shell '/bin/rootshell -c "mkdir /data/rayhunter"'
|
adb shell '/bin/rootshell -c "mkdir /data/rayhunter"'
|
||||||
|
|||||||
Reference in New Issue
Block a user