forked from fin3ss3g0d/evilgophish
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-docker.sh
executable file
·34 lines (29 loc) · 926 Bytes
/
setup-docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
if [ "$#" -ne 7 ]; then
echo "Usage: $0 <root_domain> <evilginx3_subs> <e_root_bool> <redirect_url> <feed_bool> <rid_replacement> <bl_bool>"
exit 1
fi
# Assign variables based on arguments
ROOT_DOMAIN=$1
EVILGINX3_SUBS=$2
E_ROOT_BOOL=$3
REDIRECT_URL=$4
FEED_BOOL=$5
RID_REPLACEMENT=$6
BL_BOOL=$7
# Function to replace environment variables in docker-compose.yml
replace_env() {
sed -i "s|${2}:.*|${2}: ${1}|g" docker-compose.yml
}
# Replace values in docker-compose.yml
replace_env "${ROOT_DOMAIN}" "ROOT_DOMAIN"
replace_env "${EVILGINX3_SUBS}" "EVILGINX3_SUBS"
replace_env "${E_ROOT_BOOL}" "E_ROOT_BOOL"
replace_env "${REDIRECT_URL}" "REDIRECT_URL"
replace_env "${FEED_BOOL}" "FEED_BOOL"
replace_env "${RID_REPLACEMENT}" "RID_REPLACEMENT"
replace_env "${BL_BOOL}" "BL_BOOL"
git restore .
find . -type f -exec sed -i "s|client_id|${RID_REPLACEMENT}|g" {} \;
# Build Docker images
docker compose build