-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Docker: Firmware version passed as argument or default to 1100
- Loading branch information
1 parent
74b4da9
commit 5a3eb06
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Set default firmware version if not provided | ||
FIRMWARE_VERSION="${FIRMWARE_VERSION:-1100}" | ||
# Firmware version passed as argument or default to 1100 | ||
FIRMWARE_VERSION=${1:-1100} | ||
|
||
# Download the correct stage1 and stage2 binaries for the firmware version | ||
echo "Downloading firmware binaries for version ${FIRMWARE_VERSION}..." | ||
wget -q https://github.com/B-Dem/PPPwnUI/raw/main/PPPwn/goldhen/${FIRMWARE_VERSION}/stage1.bin | ||
wget -q https://github.com/B-Dem/PPPwnUI/raw/main/PPPwn/goldhen/${FIRMWARE_VERSION}/stage2.bin | ||
# Download the firmware binaries | ||
echo "Downloading firmware binaries for version $FIRMWARE_VERSION..." | ||
wget -q -P /opt/pppwn https://github.com/B-Dem/PPPwnUI/raw/main/PPPwn/goldhen/${FIRMWARE_VERSION}/stage1.bin | ||
wget -q -P /opt/pppwn https://github.com/B-Dem/PPPwnUI/raw/main/PPPwn/goldhen/${FIRMWARE_VERSION}/stage2.bin | ||
|
||
if [ ! -f "stage1.bin" ] || [ ! -f "stage2.bin" ]; then | ||
echo "Error: Failed to download firmware binaries for version ${FIRMWARE_VERSION}" | ||
# Check if the files were downloaded correctly | ||
if [ ! -f "/opt/pppwn/stage1.bin" ] || [ ! -f "/opt/pppwn/stage2.bin" ]; then | ||
echo "Error: Failed to download firmware binaries for version $FIRMWARE_VERSION" | ||
exit 1 | ||
fi | ||
|
||
# Run the PPPwn++ binary with the correct firmware version and downloaded stages | ||
/opt/pppwn/pppwn -i eth0 --fw "$FIRMWARE_VERSION" --stage1 /opt/pppwn/stage1.bin --stage2 /opt/pppwn/stage2.bin -a | ||
# Run PPPwn++ | ||
/opt/pppwn/pppwn -i eth0 --fw $FIRMWARE_VERSION --stage1 /opt/pppwn/stage1.bin --stage2 /opt/pppwn/stage2.bin -a |