From c3494e338f39a42eddc9b52a7db75fb428199388 Mon Sep 17 00:00:00 2001 From: Paul Beltrani Date: Sun, 9 Mar 2025 22:27:48 -0400 Subject: [PATCH 1/7] Merge install scripts into a single, isntall.sh --- dist/install-linux.sh | 23 ------------ dist/install-mac.sh | 22 ------------ dist/{install-common.sh => install.sh} | 50 ++++++++++++++++++-------- 3 files changed, 36 insertions(+), 59 deletions(-) delete mode 100755 dist/install-linux.sh delete mode 100755 dist/install-mac.sh rename dist/{install-common.sh => install.sh} (69%) diff --git a/dist/install-linux.sh b/dist/install-linux.sh deleted file mode 100755 index 55204ab..0000000 --- a/dist/install-linux.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/env bash - -set -e -export SERIAL_PATH="./serial-ubuntu-latest/serial" - -if [ ! -x "$SERIAL_PATH" ]; then - echo "The serial binary cannot be found at $SERIAL_PATH. If you are running this from the git tree please instead run it from the latest release bundle https://github.com/EFForg/rayhunter/releases" - exit 1 -fi - -if ! command -v adb &> /dev/null; then - if [ ! -d ./platform-tools ] ; then - echo "adb not found, downloading local copy" - curl -O "https://dl.google.com/android/repository/platform-tools-latest-linux.zip" - unzip platform-tools-latest-linux.zip - fi - export ADB="./platform-tools/adb" -else - export ADB=`which adb` -fi - -. "$(dirname "$0")"/install-common.sh -install diff --git a/dist/install-mac.sh b/dist/install-mac.sh deleted file mode 100755 index 24dacdd..0000000 --- a/dist/install-mac.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -e - -export SERIAL_PATH="./serial-macos-latest/serial" -if [ ! -x "$SERIAL_PATH" ]; then - echo "The serial binary cannot be found at $SERIAL_PATH. If you are running this from the git tree please instead run it from the latest release bundle at https://github.com/EFForg/rayhunter/releases" - exit 1 -fi - -if ! command -v adb &> /dev/null; then - if [ ! -d ./platform-tools ]; then - echo "adb not found, downloading local copy" - curl -O "https://dl.google.com/android/repository/platform-tools-latest-darwin.zip" - unzip platform-tools-latest-darwin.zip - fi - export ADB="./platform-tools/adb" -else - export ADB=`which adb` -fi - -. "$(dirname "$0")"/install-common.sh -install diff --git a/dist/install-common.sh b/dist/install.sh similarity index 69% rename from dist/install-common.sh rename to dist/install.sh index 60b194a..e70ea40 100755 --- a/dist/install-common.sh +++ b/dist/install.sh @@ -1,18 +1,5 @@ #!/usr/bin/env bash -install() { - if [[ -z "${SERIAL_PATH}" ]]; then - echo "\$SERIAL_PATH not set, did you run this from install-linux.sh or install-mac.sh?" - exit 1 - fi - if [[ -z "${ADB}" ]]; then - echo "\$ADB not set, did you run this from install-linux.sh or install-mac.sh?" - exit 1 - fi - force_debug_mode - setup_rootshell - setup_rayhunter - test_rayhunter -} +set -e force_debug_mode() { echo "Using adb at $ADB" @@ -108,3 +95,38 @@ test_rayhunter() { done echo "timeout reached! failed to reach rayhunter url $URL, something went wrong :(" } + +##### ##### ##### +##### Main ##### +##### ##### ##### +if [ `uname -s` = "Linux" ]; then + export SERIAL_PATH="./serial-ubuntu-latest/serial" + export PLATFORM_TOOLS="platform-tools-latest-linux.zip" +elif [ `uname -s` = "Darwin" ]; then + export SERIAL_PATH="./serial-macos-latest/serial" + export PLATFORM_TOOLS="platform-tools-latest-darwin.zip" +else + echo "This script only supports Linux or macOS" + exit 1 +fi + +if [ ! -x "$SERIAL_PATH" ]; then + echo "The serial binary cannot be found at $SERIAL_PATH. If you are running this from the git tree please instead run it from the latest release bundle https://github.com/EFForg/rayhunter/releases" + exit 1 +fi + +if ! command -v adb &> /dev/null; then + if [ ! -d ./platform-tools ] ; then + echo "adb not found, downloading local copy" + curl -O "https://dl.google.com/android/repository/${PLATFORM_TOOLS}" + unzip $PLATFORM_TOOLS + fi + export ADB="./platform-tools/adb" +else + export ADB=`which adb` +fi + +force_debug_mode +setup_rootshell +setup_rayhunter +test_rayhunter From 77944dd17c5b6a80ed3bd4104341cf086aa53be0 Mon Sep 17 00:00:00 2001 From: Cooper Quintin Date: Mon, 10 Mar 2025 17:49:09 -0700 Subject: [PATCH 2/7] add security file --- SECURITY.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..f9c1e57 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Security vulnerabilities can be reported using GitHub's [private vulnerability reporting tool](https://github.com/certbot/certbot/security/advisories/new). From 2ffb1d4620665beaa3a88d92af4015fe7f82ede8 Mon Sep 17 00:00:00 2001 From: Alexis Date: Wed, 12 Mar 2025 07:10:03 +0900 Subject: [PATCH 3/7] Update SECURITY.md Just fixing the relative link to this project --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index f9c1e57..0ea9e8a 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ ## Reporting a Vulnerability -Security vulnerabilities can be reported using GitHub's [private vulnerability reporting tool](https://github.com/certbot/certbot/security/advisories/new). +Security vulnerabilities can be reported using GitHub's [private vulnerability reporting tool](https://github.com/EFForg/rayhunter/security/advisories/new). From ca4e560e92a09d29f2f291dbc5fb102e7e002264 Mon Sep 17 00:00:00 2001 From: Will Greenberg Date: Wed, 12 Mar 2025 11:56:12 -0700 Subject: [PATCH 4/7] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 012f0f5..28867f8 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,12 @@ Now you can root your device and install Rayhunter by running `./tools/install-d * push to the device with `./make.sh` +## Support and Discussion + +If you're having issues installing or using Rayhunter, please open an issue in this repo. Join us in the `#rayhunter` channel of [EFF's Mattermost](https://opensource.eff.org/signup_user_complete/?id=6iqur37ucfrctfswrs14iscobw&md=link&sbr=su) instance to chat! + ## Documentation -* Build docs locallly using `RUSTDOCFLAGS="--cfg docsrs" cargo doc --no-deps --all-features --open` +* Build docs locally using `RUSTDOCFLAGS="--cfg docsrs" cargo doc --no-deps --all-features --open` **LEGAL DISCLAIMER:** Use this program at your own risk. We beilieve running this program does not currently violate any laws or regulations in the United States. However, we are not responsible for civil or criminal liability resulting from the use of this software. If you are located outside of the US please consult with an attorney in your country to help you assess the legal risks of running this program. From 7eb61748d720e558c9bb390be303b0b609d5b5ed Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 15 Mar 2025 20:42:37 -0700 Subject: [PATCH 5/7] Update readme: Add link to PGP key for contact email address --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28867f8..c9c2986 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Once installed, Rayhunter will run automatically whenever your Orbic device is r ### Help, Rayhunter's line is red! What should I do? Unfortunately, the circumstances that might lead to a positive CSS signal are quite varied, so we don't have a universal recommendation for how to deal with the a positive signal. You might also want to turn off your phone until you are out of the area (or put it on airplane mode,) and tell your friends to do the same! - Please feel free to contact an EFF technologist with more information & a copy of the QMDL in question at [info@eff.org](mailto:info@eff.org). Please note that this file may contain sensetive information such as your IMSI and the unique IDs of cell towers you were near which could be used to ascertain your location at the time. + Please feel free to contact an EFF technologist with more information & a copy of the QMDL in question at [info@eff.org](mailto:info@eff.org). Please note that this file may contain sensetive information such as your IMSI and the unique IDs of cell towers you were near which could be used to ascertain your location at the time. We encourage you to use PGP encryption when sending your message. You can find the [PGP public key for info@eff.org here](https://www.eff.org/about/contact#main-content). ### Does Rayhunter work outside of the US? **Probably**. Some Rayhunter users have reported successfully using it in other countries with unlocked devices and SIM cards from local telcos. We can't guarantee whether or not it will work for you though. ### Should I get a locked or unlocked orbic device? What is the difference? From f69487853a55860951e996f9b4ac8ebce2210613 Mon Sep 17 00:00:00 2001 From: rbomze <14312790+rbomze@users.noreply.github.com> Date: Sat, 8 Mar 2025 20:58:27 +0100 Subject: [PATCH 6/7] minimized the binary size --- .cargo/config.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 16df86f..318eb3d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,11 @@ [target.armv7-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc" rustflags = ["-C", "target-feature=+crt-static"] + +# optimizations to reduce the binary size +[profile.release] +strip = true +opt-level = "z" +lto = true +codegen-units = 1 +panic = "abort" From 4214b27c0f9edfbaef8ea036216bdcd257399b62 Mon Sep 17 00:00:00 2001 From: Cooper Quintin Date: Tue, 18 Mar 2025 18:21:43 -0700 Subject: [PATCH 7/7] fix nits in install.sh and update readme with new instructions --- README.md | 12 ++++++++---- dist/install.sh | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c9c2986..9bfdb4f 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,17 @@ Or on [Ebay](https://www.ebay.com/sch/i.html?_nkw=orbic+rc400l) ## Setup -*NOTE: We don't currently support automated installs on windows, you will have to follow the manual install instructions below* 1. Download the latest [Rayhunter release bundle](https://github.com/EFForg/rayhunter/releases) and extract it. -**If you are installing from the cloned github repository please see the development instructions below, running `install-linux.sh` from the git tree will not work.** +**If you are installing from the cloned github repository please see the development instructions below, running `install.sh` from the git tree will not work.** 2. Turn on the Orbic device and plug it into your computer using a USB-C Cable. -2. Run the install script inside the bundle corresponding to your platform (`install-linux.sh`, `install-mac.sh`). The Linux installer has only been tested on the latest version of Ubuntu. If it fails you will need to follow the install steps outlined in **Development** below. -3. Once finished, Rayhunter should be running! You can verify this by visiting the web UI as described below. +3. On MacOS or Linux run the install script `install.sh`. +4. Once finished, Rayhunter should be running! You can verify this by visiting the web UI as described below. + +### Notes + * The install script has only been tested for Linux on the latest version of Ubuntu. If it fails you will need to follow the install steps outlined in **Development** below. + * The install script also won't work on older macs with intel chips, for those macs you will need to follow the instructions at https://github.com/EFForg/rayhunter/wiki/Install-Rayhunter-on-Mac-Intel-devices + * We don't currently support automated installs on windows, you will have to follow the manual install instructions below* ## Usage diff --git a/dist/install.sh b/dist/install.sh index e70ea40..ec1e0d4 100755 --- a/dist/install.sh +++ b/dist/install.sh @@ -99,14 +99,14 @@ test_rayhunter() { ##### ##### ##### ##### Main ##### ##### ##### ##### -if [ `uname -s` = "Linux" ]; then +if [[ `uname -s` == "Linux" ]]; then export SERIAL_PATH="./serial-ubuntu-latest/serial" export PLATFORM_TOOLS="platform-tools-latest-linux.zip" -elif [ `uname -s` = "Darwin" ]; then +elif [[ `uname -s` == "Darwin" && `uname -m` == "arm64" ]]; then export SERIAL_PATH="./serial-macos-latest/serial" export PLATFORM_TOOLS="platform-tools-latest-darwin.zip" else - echo "This script only supports Linux or macOS" + echo "This script only supports Linux or macOS with M1/M2 arm chips, for MacOS on Intel devices see the instructions here: https://github.com/EFForg/rayhunter/wiki/Install-Rayhunter-on-Mac-Intel-devices" exit 1 fi