#!/bin/sh # ═══════════════════════════════════════════════════════════════════════════════ # i1.is - Security Operations Center | Defenders Hub # ═══════════════════════════════════════════════════════════════════════════════ set -e # Terminal colors & styles if [ -t 1 ]; then R='\033[0;31m' G='\033[0;32m' Y='\033[1;33m' B='\033[0;34m' C='\033[0;36m' M='\033[0;35m' W='\033[1;37m' D='\033[0;90m' N='\033[0m' BR='\033[1;31m' BG='\033[1;32m' BC='\033[1;36m' else R='' G='' Y='' B='' C='' M='' W='' D='' N='' BR='' BG='' BC='' fi clear # Fetch live stats (fast timeout, silent fail) STATS=$(curl -sf --max-time 2 "https://i1.is/api/stats" 2>/dev/null || echo "") if [ -n "$STATS" ]; then NODES=$(echo "$STATS" | sed -n 's/.*"nodes":\([0-9]*\).*/\1/p' 2>/dev/null || echo "2") BLOCKED=$(echo "$STATS" | sed -n 's/.*"blocked":\([0-9]*\).*/\1/p' 2>/dev/null || echo "0") INSTALLS=$(echo "$STATS" | sed -n 's/.*"installs":\([0-9]*\).*/\1/p' 2>/dev/null || echo "0") else NODES="2" BLOCKED="0" INSTALLS="0" fi TIME=$(date '+%H:%M:%S') DATE=$(date '+%Y.%m.%d') printf "\n" printf "${D}══════════════════════════════════════════════════════════════════════════════════${N}\n" printf "\n" printf " ${BR} ▀████▀ ▄█ ${N} ${D}╭────────────────────────────────────────────────────╮${N}\n" printf " ${BR} ██ ███ ${N} ${D}│${N} ${D}│${N}\n" printf " ${BR} ██ ██ ${N} ${D}│${N} ${BC}█▀▀ █▀▀ █▀▀ █ █ █▀▄ ▀█▀ ▀█▀ █ █${N} ${D}│${N}\n" printf " ${BR} ██ ██ ${N} ${D}│${N} ${BC}▀▀█ █▀▀ █ █ █ █▀▄ █ █ ▀█▀${N} ${D}│${N}\n" printf " ${BR} ██ ██ ${N} ${D}│${N} ${BC}▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀${N} ${D}│${N}\n" printf " ${BR} ▄████████▄████▄${N} ${D}│${N} ${W}OPERATIONS CENTER${N} ${D}│${N}\n" printf " ${D} ▀▀▀▀▀▀▀▀▀▀▀▀▀${N} ${D}│${N} ${D}│${N}\n" printf " ${D}│${N} ${G}●${N} NODES ACTIVE ${BG}$NODES${N} ${D}│${N}\n" printf " ${D}i1.is${N} ${D}│${N} ${R}◆${N} THREATS BLOCKED ${BR}$BLOCKED${N} ${D}│${N}\n" printf " ${D}─────${N} ${D}│${N} ${C}▶${N} TOTAL INSTALLS ${BC}$INSTALLS${N} ${D}│${N}\n" printf " ${D}Defenders Hub${N} ${D}│${N} ${D}│${N}\n" printf " ${D}│${N} ${D}$DATE $TIME${N} ${D}│${N}\n" printf " ${D}╰────────────────────────────────────────────────────╯${N}\n" printf "\n" printf " ${W}Where defenders get their tools.${N}\n" printf "\n" printf "${D}══════════════════════════════════════════════════════════════════════════════════${N}\n" printf "\n" printf " ${C}▸ Scanning environment...${N}\n" printf "\n" # Detect OS OS="unknown" ARCH="unknown" DISTRO="" if [ -f /etc/os-release ]; then . /etc/os-release OS=$(echo "$ID" | tr '[:upper:]' '[:lower:]') DISTRO="$ID-$VERSION_ID" elif [ "$(uname)" = "Darwin" ]; then OS="macos" DISTRO="$(sw_vers -productVersion)" elif [ "$(uname)" = "FreeBSD" ]; then OS="freebsd" DISTRO="$(freebsd-version)" else OS="$(uname -s | tr '[:upper:]' '[:lower:]')" fi # Detect architecture ARCH="$(uname -m)" case "$ARCH" in x86_64|amd64) ARCH="x86_64" ;; aarch64|arm64) ARCH="aarch64" ;; armv7*) ARCH="armv7" ;; i686|i386) ARCH="i386" ;; esac echo "✓ Detected: $OS ($ARCH)" [ -n "$DISTRO" ] && echo " Distribution: $DISTRO" # Check for required tools MISSING_TOOLS="" for tool in curl tar gzip; do if ! command -v "$tool" >/dev/null 2>&1; then MISSING_TOOLS="$MISSING_TOOLS $tool" fi done if [ -n "$MISSING_TOOLS" ]; then echo "" echo "⚠ Missing required tools:$MISSING_TOOLS" echo " Please install them first." exit 1 fi # Fetch the installation menu for this specific OS/arch echo "" echo "→ Fetching installation menu..." curl -fsSL "https://i1.is/install?os=$OS&arch=$ARCH&distro=$DISTRO" | sh # ============================================================================ # If you see this message, the script completed successfully! # # TROUBLESHOOTING: # ---------------- # If the script didn't work as expected, try: # curl -sSL https://i1.is | sh # # For help: https://i1.is or https://github.com/8b-is/i1-is # ============================================================================