Files
FSI/WEB_SERVER.sh
2026-05-23 13:20:24 +01:00

29 lines
588 B
Bash

#!/bin/bash
source CONFIG.sh
# interfaces
IP="10.60.0.2"
sudo ifconfig enp0s8 $IP netmask 255.255.255.0
sudo route add default gw 10.60.0.1
# instalar packages
instalar nodejs
# instalar juice-shop se nao existir
jspath="/var/juice-shop"
if [[ ! -d "$jspath" ]]; then
mkdir "$jspath"
curl -o js.tar.gz "https://github.com/juice-shop/juice-shop/releases/download/v20.0.0/juice-shop-20.0.0_node24_linux_x64.tgz"
tar -xzvf js.tar.gz "$jspath"
rm js.tar.gz
cd "$jspath"
npm i
fi
# fazer so depois de instalar tudo
ativar_firewall
# correr juice shop via npm
npm start