SHAD3
SHAD3 is an application using SHA3-512 to hash entries in a list or multiple lists, typically those made for Pi-hole. This is designed for SHATTER and similar applications or addons. Ideally, it serves to maintain the confidentiality of blocked content, which may include exploitative or abusive websites.
Example Usage
Installation Options with Architecture Detection
Binary Installation (Recommended)
Pre-built binaries are available in the releases section. The following one-liners automatically detect the CPU architecture and download the correct binary:
Linux Binary
ARCH= && && && && && &&
macOS Binary
ARCH= && && && && && &&
Windows Binary (PowerShell)
$ARCH = (Get-WmiObject Win32_Processor).Architecture
if ($ARCH -eq 9) {
$BIN = 'shad3-windows_x86_64.zip'
} elseif ($ARCH -eq 5) {
$BIN = 'shad3-windows_aarch64.zip'
} else {
Write-Host "Unsupported architecture: $ARCH" -ForegroundColor Red
exit
}
Invoke-WebRequest -Uri "https://github.com/styromaniac/shad3/releases/latest/download/$BIN" -OutFile $BIN
Expand-Archive -Path $BIN -DestinationPath .
Move-Item -Path .\shad3.exe -Destination "$env:ProgramFiles\shad3.exe"
Remove-Item -Recurse -Force $BIN
Termux Binary
ARCH= && && && && && &&
Installation from Source
These one-liners download, build using Cargo, install, and clean up for each environment. They utilize Rust utilities and commands (cargo
) where applicable, and account for Linux package managers. For Termux, rustup
is avoided by using pkg
to install Rust.
Linux Source
# Detect package manager and install Rust
if ; then
&&
elif ; then
elif ; then
else
fi && # Install SHAD3 using Cargo
&& # Ensure Cargo bin directory is in PATH
&& # Optionally move the binary to a system-wide location
macOS Source
# Install Homebrew if not installed
if ! ; then
fi && # Install Rust and Cargo using Homebrew
&& # Install SHAD3 using Cargo
&& # Ensure Cargo bin directory is in PATH
&& # Optionally move the binary to a system-wide location
Windows Source (PowerShell)
# Install Rust using Cargo via Chocolatey
if (-not (Get-Command choco -ErrorAction SilentlyContinue)) {
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
}
choco install -y rustup.install && refreshenv && rustup default stable && # Install SHAD3 using Cargo
cargo install shad3 && # Move the binary to a system-wide location
Move-Item -Path "$env:USERPROFILE\.cargoin\shad3.exe" -Destination "$env:ProgramFiles\shad3.exe"
Termux Source
# Update packages and install Rust via pkg (avoiding rustup)
&& && # Install SHAD3 using Cargo
&& # Move the binary to a system-wide location
Verification
After installation, verify with:
You should see the usage information for SHAD3, confirming a successful installation.
Platform Compatibility
SHAD3 is compatible with the following:
- Operating Systems: Linux, macOS, Windows, Termux (Android/ChromeOS)
- Architectures: x86-64, ARM64
Troubleshooting
If you encounter any issues during installation or use, please check:
- Dependencies and Build Tools:
- Linux/macOS: Ensure
curl
,tar
, andsudo
are installed. - Windows: Ensure PowerShell is updated and has necessary permissions.
- Termux: Ensure
curl
,tar
,unzip
, andrust
are installed viapkg
.
- Linux/macOS: Ensure
- Path Configuration:
- Verify the binary is added to your
PATH
if using a direct download or Cargo installation.
- Verify the binary is added to your
- Rust-related Issues:
- For source installations, ensure Rust and Cargo are correctly installed and accessible.
- Consult the Rust documentation for issues related to
cargo
or the Rust toolchain.
Notes:
- Rust Installation:
- For Linux, macOS, and Windows, the from source installation one-liners utilize the respective package managers to install Rust and Cargo, ensuring compatibility with the system's package management.
- For Termux, since
rustup
is not available, Rust is installed via the package manager (pkg
), and the environment is set up accordingly.