feat: add setup config and script to easily modify default profile

This commit is contained in:
2026-06-26 00:01:12 +01:00
parent 83fb8e1287
commit 01fe12a9ac
4 changed files with 46 additions and 4 deletions
+1
View File
@@ -1 +1,2 @@
.env
setup.conf
+4 -4
View File
@@ -12,7 +12,7 @@ Teamserver {
WebHook {
Discord {
# required
Url = "https://discord.com/api/webhooks/<bla>/<bla>" # replace this with your webhook
Url = "{{DISCORD_WEBHOOK}}"
# optional
AvatarUrl = "https://raw.githubusercontent.com/HavocFramework/Havoc/main/assets/Havoc.png" # url to an image to use as an avatar
@@ -24,8 +24,8 @@ WebHook {
# For God's sake, change this...
Operators {
user "admin" {
Password = "admin"
user "{{OPERATOR_USER}}" {
Password = "{{OPERATOR_PASS}}"
}
}
@@ -40,7 +40,7 @@ Listeners {
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
Hosts = [
"c2.example.com" # replace with your actual host
"{{C2_DOMAIN}}"
]
}
}
+9
View File
@@ -0,0 +1,9 @@
# Listener & Cloudflare
C2_DOMAIN="c2.example.com"
# OpCreds (Teamserver)
OPERATOR_USER="admin"
OPERATOR_PASS="admin"
# Discord Webhook Config
DISCORD_WEBHOOK="https://discord.com/api/webhooks/123456/abcdef"
Executable
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -e
CONFIG_FILE="setup.conf"
PROFILE_FILE="./profiles/default.yaotl"
# validate files
if [ ! -f "$CONFIG_FILE" ]; then
echo -e "\e[31m[!] Error: Could not find ${CONFIG_FILE}\e[0m"
exit 1
fi
if [ ! -f "$PROFILE_FILE" ]; then
echo -e "\e[31m[!] Error: Could not find default profile in ${PROFILE_FILE}\e[0m"
exit 1
fi
# load vars
source "$CONFIG_FILE"
echo -e "\e[34m[*] Appliying changes...\e[0m"
# replace useing sed
sed -i "s|{{C2_DOMAIN}}|${C2_DOMAIN}|g" "$PROFILE_FILE"
sed -i "s|{{OPERATOR_USER}}|${OPERATOR_USER}|g" "$PROFILE_FILE"
sed -i "s|{{OPERATOR_PASS}}|${OPERATOR_PASS}|g" "$PROFILE_FILE"
sed -i "s|{{DISCORD_WEBHOOK}}|${DISCORD_WEBHOOK}|g" "$PROFILE_FILE"
sed -i "s|{{DEMON_SLEEP}}|${DEMON_SLEEP}|g" "$PROFILE_FILE"
sed -i "s|{{DEMON_JITTER}}|${DEMON_JITTER}|g" "$PROFILE_FILE"
echo -e "\e[32m[+] Placeholders have been replaced successfully.\e[0m"