This commit is contained in:
Wes Lambert
2020-02-28 23:53:21 +00:00
parent d21967f7e3
commit 45631ee114
3 changed files with 58 additions and 0 deletions

22
entrypoint Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
VERSION="0.3.9"
BIND_ADDRESS="0.0.0.0"
PUBLIC_PATH="public"
LOG_DIR="."
SERVER_URL="https://velociraptor:8000/"
USER="admin"
PASSWORD="admin"
DATASTORE_LOCATION="."
FILESTORE_DIRECTORY="."
if [ ! -f server.config.yaml ]; then
./velociraptor config generate > server.config.yaml --merge '{"Frontend": {"public_path":"'$PUBLIC_PATH'"}, "API": { "bind_address": "'$BIND_ADDRESS'" }, "GUI": { "bind_address": "'$BIND_ADDRESS'"}, "Monitoring": {"bind_address": "'$BIND_ADDRESS'" }, "Logging": {"output_directory":"'$LOG_DIR'","separate_logs_per_component": true, "Client": { "server_urls": ["'$SERVER_URL'"]}, "Datastore": {"location": "'$DATASTORE_LOCATION'", "filestore_directory": "'$FILESTORE_DIRECTORY'"}}}'
sed -i "s#https://localhost:8000/#$SERVER_URL#" server.config.yaml
sed -i 's#/tmp/velociraptor#.#'g server.config.yaml
./velociraptor --config server.config.yaml user add $USER $PASSWORD
./velociraptor --config server.config.yaml config client > client.config.yaml
./velociraptor config repack --exe clients/windows/velociraptor_client.exe client.config.yaml clients/windows/velociraptor_client_repacked.exe
fi
cd /velociraptor
#/bin/bash
./velociraptor --config server.config.yaml frontend -v