Fixed flag in webpanel

This commit is contained in:
Giulio 2020-07-19 16:57:02 +02:00
parent 4dc90d192f
commit 52dd876c2e

View File

@ -23,6 +23,13 @@ mkdir -p target/overlay/var/www/html
echo "[+] Cloning buildroot" echo "[+] Cloning buildroot"
git clone https://github.com/buildroot/buildroot.git target/buildroot git clone https://github.com/buildroot/buildroot.git target/buildroot
echo "[+] Adding customization files"
cp -R buildroot/* target/buildroot # copy buildroot configs
sed -i "s/###ROOTPASSWORD###/$password/g" target/buildroot/configs/pcengines_apu2_defconfig
cp -R conf/* target/overlay # copy target system config files
cp -R webpanel/* target/overlay/var/www/html # copy the webpanel
cp -R update/update.sh target/overlay #copy the update script and certificate
echo "[+] Writing flags" echo "[+] Writing flags"
sed -i "s/##FLAG1##/$flag1/g" target/overlay/var/www/html/include/config.php sed -i "s/##FLAG1##/$flag1/g" target/overlay/var/www/html/include/config.php
echo $flag2 > target/overlay/flag echo $flag2 > target/overlay/flag
@ -32,13 +39,6 @@ chmod 700 target/overlay/root
echo $flag3 > target/overlay/root/flag echo $flag3 > target/overlay/root/flag
chmod 400 target/overlay/root/flag chmod 400 target/overlay/root/flag
echo "[+] Adding customization files"
cp -R buildroot/* target/buildroot # copy buildroot configs
sed -i "s/###ROOTPASSWORD###/$password/g" target/buildroot/configs/pcengines_apu2_defconfig
cp -R conf/* target/overlay # copy target system config files
cp -R webpanel/* target/overlay/var/www/html # copy the webpanel
cp -R update/update.sh target/overlay #copy the update script and certificate
echo "[+] Building the keygen" echo "[+] Building the keygen"
mkdir -p target/overlay/usr/sbin mkdir -p target/overlay/usr/sbin
gcc -o target/overlay/usr/sbin/cfgbin keygen/keygen.c -static -lm gcc -o target/overlay/usr/sbin/cfgbin keygen/keygen.c -static -lm