From b334e9bd159354d4f664aaafc01a05a56594cc04 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Fri, 24 Jan 2025 11:34:00 +0100 Subject: [PATCH 01/11] My try to add Cyberbro KASM Workspace image --- dockerfile-kasm-cyberbro | 48 ++++++++++++ docs/cyberbro/README.md | 11 +++ docs/cyberbro/demo.txt | 9 +++ docs/cyberbro/description.txt | 1 + src/ubuntu/install/cyberbro/custom_startup.sh | 78 +++++++++++++++++++ .../install/cyberbro/install_cyberbro.sh | 37 +++++++++ 6 files changed, 184 insertions(+) create mode 100644 dockerfile-kasm-cyberbro create mode 100644 docs/cyberbro/README.md create mode 100644 docs/cyberbro/demo.txt create mode 100644 docs/cyberbro/description.txt create mode 100644 src/ubuntu/install/cyberbro/custom_startup.sh create mode 100644 src/ubuntu/install/cyberbro/install_cyberbro.sh diff --git a/dockerfile-kasm-cyberbro b/dockerfile-kasm-cyberbro new file mode 100644 index 00000000..6f693d3e --- /dev/null +++ b/dockerfile-kasm-cyberbro @@ -0,0 +1,48 @@ +ARG BASE_TAG="develop" +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG + +USER root + +ENV HOME=/home/kasm-default-profile +ENV STARTUPDIR=/dockerstartup +ENV LAUNCH_URL=http://127.0.0.1:5000 +WORKDIR $HOME + +### Envrionment config +ENV DEBIAN_FRONTEND=noninteractive \ + SKIP_CLEAN=true \ + KASM_RX_HOME=$STARTUPDIR/kasmrx \ + DONT_PROMPT_WSL_INSTALL="No_Prompt_please" \ + INST_DIR=$STARTUPDIR/install \ + INST_SCRIPTS="/ubuntu/install/tools/install_tools_deluxe.sh \ + /ubuntu/install/firefox/install_firefox.sh \ + /ubuntu/install/cyberbro/install_cyberbro.sh \ + /ubuntu/install/cleanup/cleanup.sh" + +# Copy install scripts +COPY ./src/ $INST_DIR + +RUN cp /usr/share/backgrounds/bg_kasm.png /usr/share/backgrounds/bg_default.png +COPY ./src/ubuntu/install/cyberbro/custom_startup.sh $STARTUPDIR/custom_startup.sh +RUN chmod +x $STARTUPDIR/custom_startup.sh +RUN chmod 755 $STARTUPDIR/custom_startup.sh + +# Run installations +RUN \ + for SCRIPT in $INST_SCRIPTS; do \ + bash ${INST_DIR}${SCRIPT} || exit 1; \ + done && \ + $STARTUPDIR/set_user_permission.sh $HOME && \ + rm -f /etc/X11/xinit/Xclients && \ + chown 1000:0 $HOME && \ + mkdir -p /home/kasm-user && \ + chown -R 1000:0 /home/kasm-user && \ + rm -Rf ${INST_DIR} + +# Userspace Runtime +ENV HOME /home/kasm-user +WORKDIR $HOME +USER 1000 + +CMD ["--tail-log"] diff --git a/docs/cyberbro/README.md b/docs/cyberbro/README.md new file mode 100644 index 00000000..294d01b8 --- /dev/null +++ b/docs/cyberbro/README.md @@ -0,0 +1,11 @@ +# About This Image + +This Image contains a browser-accessible version of [Cyberbro](https://github.com/stanfrbd/cyberbro). + +![Screenshot][Image_Screenshot] + +[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/ "Image Screenshot" + +# Environment Variables + +* `FIREFOX_APP_ARGS` - Additional arguments to pass to firefox when launched. diff --git a/docs/cyberbro/demo.txt b/docs/cyberbro/demo.txt new file mode 100644 index 00000000..04359184 --- /dev/null +++ b/docs/cyberbro/demo.txt @@ -0,0 +1,9 @@ +# Live Demo + + + +**Launch a real-time demo in a new browser window:** Live Demo. + + + +∗*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.* diff --git a/docs/cyberbro/description.txt b/docs/cyberbro/description.txt new file mode 100644 index 00000000..a14e442e --- /dev/null +++ b/docs/cyberbro/description.txt @@ -0,0 +1 @@ +Cyberbro for Kasm Workspaces \ No newline at end of file diff --git a/src/ubuntu/install/cyberbro/custom_startup.sh b/src/ubuntu/install/cyberbro/custom_startup.sh new file mode 100644 index 00000000..1bd7e106 --- /dev/null +++ b/src/ubuntu/install/cyberbro/custom_startup.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +set -ex +START_COMMAND="firefox" +PGREP="firefox" +export MAXIMIZE="false" +export MAXIMIZE_NAME="Mozilla Firefox" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh +DEFAULT_FIREFOX_ARGS="" +FIREFOX_ARGS=${FIREFOX_APP_ARGS:-$DEFAULT_FIREFOX_ARGS} + +CYBERBRO_SERVER="127.0.0.1:5000" +DEFAULT_SPIDERFOOT_ARGS="-l $CYBERBRO_SERVER" +SPIDERFOOT_ARGS=${SPIDERFOOT_APP_ARGS:-$DEFAULT_SPIDERFOOT_ARGS} + +options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit +eval set -- "$options" + +while [[ $1 != -- ]]; do + case $1 in + -g|--go) GO='true'; shift 1;; + -a|--assign) ASSIGN='true'; shift 1;; + -u|--url) OPT_URL=$2; shift 2;; + *) echo "bad option: $1" >&2; exit 1;; + esac +done +shift + +# Process non-option arguments. +for arg; do + echo "arg! $arg" +done + +FORCE=$2 + +# run with vgl if GPU is available +if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "${KASM_EGL_CARD}" ] && [ ! -z "${KASM_RENDERD}" ] && [ -O "${KASM_RENDERD}" ] && [ -O "${KASM_EGL_CARD}" ] ; then + START_COMMAND="/opt/VirtualGL/bin/vglrun -d ${KASM_EGL_CARD} $START_COMMAND" +fi + +check_web_server() { + curl -s -o /dev/null http://$CYBERBRO_SERVER && return 0 || return 1 +} + +kasm_startup() { + if [ -n "$KASM_URL" ] ; then + URL=$KASM_URL + elif [ -z "$URL" ] ; then + URL=$LAUNCH_URL + fi + + if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then + + echo "Entering process startup loop" + set +x + while true + do + if ! pgrep -x $PGREP > /dev/null + then + /usr/bin/filter_ready + /usr/bin/desktop_ready + cd $HOME/cyberbro/cyberbro-* + xfce4-terminal -x bash -c "supervisord -c /etc/supervisor/conf.d/supervisord.conf" + while ! check_web_server; do + sleep 1 + done + set +e + bash ${MAXIMIZE_SCRIPT} & + $START_COMMAND $FIREFOX_ARGS $URL + set -e + fi + sleep 1 + done + set -x + + fi +} + +kasm_startup diff --git a/src/ubuntu/install/cyberbro/install_cyberbro.sh b/src/ubuntu/install/cyberbro/install_cyberbro.sh new file mode 100644 index 00000000..7c64ff6b --- /dev/null +++ b/src/ubuntu/install/cyberbro/install_cyberbro.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -xe + +CYBERBRO_VERSION=$(curl -sX GET "https://api.github.com/repos/stanfrbd/cyberbro/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') + +# Install Spiderfoot +echo "Install Cyberbro" +apt-get update +apt-get install -y python3-pip git supervisor +CYBERBRO_HOME=$HOME/spiderfoot +mkdir -p $CYBERBRO_HOME +cd $CYBERBRO_HOME +wget https://github.com/stanfrbd/cyberbro/archive/${CYBERBRO_VERSION}.tar.gz +tar zxvf ${CYBERBRO_VERSION}.tar.gz +rm ${CYBERBRO_VERSION}.tar.gz +cd cyberbro-* +pip3 install -r requirements.txt +cp prod/supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +cat < secrets.json +{ + "proxy_url": "", + "gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "spur", "phishtank", "threatfox", "urlscan", "google", "github", "abusix"] +} +EOF + +# Cleanup for app layer +chown -R 1000:0 $HOME +find /usr/share/ -name "icon-theme.cache" -exec rm -f {} \; +if [ -z ${SKIP_CLEAN+x} ]; then + apt-get autoclean + rm -rf \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + /tmp/* +fi + From b9f5029cb5b6e4db55031b90feb66970d97b49b3 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Fri, 24 Jan 2025 12:41:16 +0100 Subject: [PATCH 02/11] dir error --- src/ubuntu/install/cyberbro/install_cyberbro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ubuntu/install/cyberbro/install_cyberbro.sh b/src/ubuntu/install/cyberbro/install_cyberbro.sh index 7c64ff6b..549cf017 100644 --- a/src/ubuntu/install/cyberbro/install_cyberbro.sh +++ b/src/ubuntu/install/cyberbro/install_cyberbro.sh @@ -7,7 +7,7 @@ CYBERBRO_VERSION=$(curl -sX GET "https://api.github.com/repos/stanfrbd/cyberbro/ echo "Install Cyberbro" apt-get update apt-get install -y python3-pip git supervisor -CYBERBRO_HOME=$HOME/spiderfoot +CYBERBRO_HOME=$HOME/cyberbro mkdir -p $CYBERBRO_HOME cd $CYBERBRO_HOME wget https://github.com/stanfrbd/cyberbro/archive/${CYBERBRO_VERSION}.tar.gz From 0c567bf4e57ae27ed8c14b6e4eba27e47f116819 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Fri, 24 Jan 2025 12:44:21 +0100 Subject: [PATCH 03/11] Remove warning for env values --- dockerfile-kasm-cyberbro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile-kasm-cyberbro b/dockerfile-kasm-cyberbro index 6f693d3e..846a68b4 100644 --- a/dockerfile-kasm-cyberbro +++ b/dockerfile-kasm-cyberbro @@ -41,7 +41,7 @@ RUN \ rm -Rf ${INST_DIR} # Userspace Runtime -ENV HOME /home/kasm-user +ENV HOME=/home/kasm-user WORKDIR $HOME USER 1000 From a0e8ecaf7549de25ebbdc9739e2de68367e4c7f1 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Fri, 24 Jan 2025 16:30:22 +0100 Subject: [PATCH 04/11] Review the way Cyberbro is launched - Only gunicorn --- src/ubuntu/install/cyberbro/custom_startup.sh | 9 ++++----- src/ubuntu/install/cyberbro/install_cyberbro.sh | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/ubuntu/install/cyberbro/custom_startup.sh b/src/ubuntu/install/cyberbro/custom_startup.sh index 1bd7e106..747b7d18 100644 --- a/src/ubuntu/install/cyberbro/custom_startup.sh +++ b/src/ubuntu/install/cyberbro/custom_startup.sh @@ -2,15 +2,13 @@ set -ex START_COMMAND="firefox" PGREP="firefox" -export MAXIMIZE="false" +export MAXIMIZE="true" export MAXIMIZE_NAME="Mozilla Firefox" MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_FIREFOX_ARGS="" FIREFOX_ARGS=${FIREFOX_APP_ARGS:-$DEFAULT_FIREFOX_ARGS} CYBERBRO_SERVER="127.0.0.1:5000" -DEFAULT_SPIDERFOOT_ARGS="-l $CYBERBRO_SERVER" -SPIDERFOOT_ARGS=${SPIDERFOOT_APP_ARGS:-$DEFAULT_SPIDERFOOT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit eval set -- "$options" @@ -59,7 +57,8 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready cd $HOME/cyberbro/cyberbro-* - xfce4-terminal -x bash -c "supervisord -c /etc/supervisor/conf.d/supervisord.conf" + # Start Cyberbro server in background + bash -c "source venv/bin/activate && gunicorn -b 0.0.0.0:5000 app:app &" while ! check_web_server; do sleep 1 done @@ -75,4 +74,4 @@ kasm_startup() { fi } -kasm_startup +kasm_startup \ No newline at end of file diff --git a/src/ubuntu/install/cyberbro/install_cyberbro.sh b/src/ubuntu/install/cyberbro/install_cyberbro.sh index 549cf017..4cdf89b3 100644 --- a/src/ubuntu/install/cyberbro/install_cyberbro.sh +++ b/src/ubuntu/install/cyberbro/install_cyberbro.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash set -xe +# Get latest Cyberbro version CYBERBRO_VERSION=$(curl -sX GET "https://api.github.com/repos/stanfrbd/cyberbro/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -# Install Spiderfoot +# Install Cyberbro echo "Install Cyberbro" apt-get update -apt-get install -y python3-pip git supervisor +apt-get install -y python3-pip git virtualenv CYBERBRO_HOME=$HOME/cyberbro mkdir -p $CYBERBRO_HOME cd $CYBERBRO_HOME @@ -14,13 +15,20 @@ wget https://github.com/stanfrbd/cyberbro/archive/${CYBERBRO_VERSION}.tar.gz tar zxvf ${CYBERBRO_VERSION}.tar.gz rm ${CYBERBRO_VERSION}.tar.gz cd cyberbro-* + +# Enter virtualenv to avoid conflicts with system packages +virtualenv venv +source venv/bin/activate + pip3 install -r requirements.txt -cp prod/supervisord.conf /etc/supervisor/conf.d/supervisord.conf +deactivate + +# Create mandatory secrets.json cat < secrets.json { "proxy_url": "", - "gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "spur", "phishtank", "threatfox", "urlscan", "google", "github", "abusix"] + "gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "spur", "phishtank", "threatfox", "urlscan", "google", "github", "ioc_one_html", "ioc_one_pdf", "abusix"] } EOF From 7c0d2108766732b0be962fb981c5b93c37d5fc67 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Fri, 24 Jan 2025 16:35:57 +0100 Subject: [PATCH 05/11] Use Ubuntu Noble for maintenance and compatibility --- dockerfile-kasm-cyberbro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile-kasm-cyberbro b/dockerfile-kasm-cyberbro index 846a68b4..5fc114ae 100644 --- a/dockerfile-kasm-cyberbro +++ b/dockerfile-kasm-cyberbro @@ -1,5 +1,5 @@ ARG BASE_TAG="develop" -ARG BASE_IMAGE="core-ubuntu-focal" +ARG BASE_IMAGE="core-ubuntu-noble" FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root From d48dad7ded3781e594e2387e73a63b1874677cd1 Mon Sep 17 00:00:00 2001 From: stanfrbd <44167150+stanfrbd@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:41:38 +0100 Subject: [PATCH 06/11] Update README.md --- docs/cyberbro/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cyberbro/README.md b/docs/cyberbro/README.md index 294d01b8..b33789ed 100644 --- a/docs/cyberbro/README.md +++ b/docs/cyberbro/README.md @@ -4,7 +4,7 @@ This Image contains a browser-accessible version of [Cyberbro](https://github.co ![Screenshot][Image_Screenshot] -[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/ "Image Screenshot" +[Image_Screenshot]: https://github.com/user-attachments/assets/f6ffb648-e161-4c59-9359-51183b0b0ca0 "Image Screenshot" # Environment Variables From 66970959302c175fe731156c1ed92f6c28c117eb Mon Sep 17 00:00:00 2001 From: stanfrbd <44167150+stanfrbd@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:53:46 +0100 Subject: [PATCH 07/11] Add support for HudsonRock API --- src/ubuntu/install/cyberbro/install_cyberbro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ubuntu/install/cyberbro/install_cyberbro.sh b/src/ubuntu/install/cyberbro/install_cyberbro.sh index 4cdf89b3..cba2bcf2 100644 --- a/src/ubuntu/install/cyberbro/install_cyberbro.sh +++ b/src/ubuntu/install/cyberbro/install_cyberbro.sh @@ -28,7 +28,7 @@ deactivate cat < secrets.json { "proxy_url": "", - "gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "spur", "phishtank", "threatfox", "urlscan", "google", "github", "ioc_one_html", "ioc_one_pdf", "abusix"] + "gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "spur", "phishtank", "threatfox", "urlscan", "google", "github", "ioc_one_html", "ioc_one_pdf", "abusix", "hudsonrock"] } EOF From b2c13a221c22b20ef612ee7919473994725b5740 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Tue, 11 Feb 2025 11:46:07 +0100 Subject: [PATCH 08/11] Update doc --- docs/cyberbro/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/cyberbro/README.md b/docs/cyberbro/README.md index b33789ed..427c89ea 100644 --- a/docs/cyberbro/README.md +++ b/docs/cyberbro/README.md @@ -8,4 +8,31 @@ This Image contains a browser-accessible version of [Cyberbro](https://github.co # Environment Variables +## Firefox Configuration + * `FIREFOX_APP_ARGS` - Additional arguments to pass to firefox when launched. + +## Cyberbro Configuration + +Here is a list of all available environment variables that can be used with examples: + +```bash +PROXY_URL=http://127.0.0.1:9000 +VIRUSTOTAL=api_key_here +ABUSEIPDB=api_key_here +IPINFO=api_key_here +GOOGLE_SAFE_BROWSING=api_key_here +MDE_TENANT_ID=api_key_here +MDE_CLIENT_ID=api_key_here +MDE_CLIENT_SECRET=api_key_here +SHODAN=api_key_here +OPENCTI_API_KEY=api_key_here +OPENCTI_URL=https://demo.opencti.io +API_PREFIX=my_api +GUI_ENABLED_ENGINES=reverse_dns,rdap,hudsonrock,mde,shodan,opencti,virustotal +CONFIG_PAGE_ENABLED=true +``` + +Refer to https://github.com/stanfrbd/cyberbro/wiki for more information. + +You must edit the config in your KASM Cyberbro Workspace settings to add these. From 89e9ffd441ba221621c0ab91e4e3dcca927cdb8b Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Tue, 11 Feb 2025 14:18:56 +0100 Subject: [PATCH 09/11] Use ENV variables to setup engines in the GUI --- src/ubuntu/install/cyberbro/install_cyberbro.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ubuntu/install/cyberbro/install_cyberbro.sh b/src/ubuntu/install/cyberbro/install_cyberbro.sh index cba2bcf2..5df71dca 100644 --- a/src/ubuntu/install/cyberbro/install_cyberbro.sh +++ b/src/ubuntu/install/cyberbro/install_cyberbro.sh @@ -24,13 +24,12 @@ pip3 install -r requirements.txt deactivate -# Create mandatory secrets.json -cat < secrets.json -{ - "proxy_url": "", - "gui_enabled_engines": ["reverse_dns", "rdap", "ipquery", "spur", "phishtank", "threatfox", "urlscan", "google", "github", "ioc_one_html", "ioc_one_pdf", "abusix", "hudsonrock"] -} -EOF +# Check if GUI_ENABLED_ENGINES is set else apply default +if [ -z ${GUI_ENABLED_ENGINES+x} ]; then + GUI_ENABLED_ENGINES=reverse_dns,rdap,ipquery,spur,phishtank,threatfox,urlscan,google,github,ioc_one_html,ioc_one_pdf,abusix,hudsonrock +fi + +export GUI_ENABLED_ENGINES # Cleanup for app layer chown -R 1000:0 $HOME From 0d0bd7efc913320244230acc789f7307c82874a2 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Tue, 11 Feb 2025 14:23:28 +0100 Subject: [PATCH 10/11] Update doc with environment variables --- docs/cyberbro/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/cyberbro/README.md b/docs/cyberbro/README.md index 427c89ea..35652e7d 100644 --- a/docs/cyberbro/README.md +++ b/docs/cyberbro/README.md @@ -33,6 +33,11 @@ GUI_ENABLED_ENGINES=reverse_dns,rdap,hudsonrock,mde,shodan,opencti,virustotal CONFIG_PAGE_ENABLED=true ``` -Refer to https://github.com/stanfrbd/cyberbro/wiki for more information. +> Note: if you set `GUI_ENABLED_ENGINES` to `""` then all engines will be enabled in the GUI. \ +> By default, all **free engines** will be enabled in the GUI. -You must edit the config in your KASM Cyberbro Workspace settings to add these. +Refer to [Cyberbro Wiki](https://github.com/stanfrbd/cyberbro/wiki) for more information. + +You must edit the config in your KASM Cyberbro Workspace settings to add these environment variables, according to [KASM official doc](https://kasmweb.com/docs/latest/guide/workspaces.html#examples) + +![image](https://github.com/user-attachments/assets/33125248-31e8-4315-a772-e0546a8be659) \ No newline at end of file From 3ffbf1da5eb97c7727011194c19dab0c4eb66539 Mon Sep 17 00:00:00 2001 From: stanfrbd Date: Tue, 11 Feb 2025 14:51:26 +0100 Subject: [PATCH 11/11] Add environment variables for easy deployment --- src/ubuntu/install/cyberbro/custom_startup.sh | 8 ++++++++ src/ubuntu/install/cyberbro/install_cyberbro.sh | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ubuntu/install/cyberbro/custom_startup.sh b/src/ubuntu/install/cyberbro/custom_startup.sh index 747b7d18..25914db5 100644 --- a/src/ubuntu/install/cyberbro/custom_startup.sh +++ b/src/ubuntu/install/cyberbro/custom_startup.sh @@ -10,6 +10,14 @@ FIREFOX_ARGS=${FIREFOX_APP_ARGS:-$DEFAULT_FIREFOX_ARGS} CYBERBRO_SERVER="127.0.0.1:5000" +# Check if GUI_ENABLED_ENGINES is set else apply default +if [ -z ${GUI_ENABLED_ENGINES+x} ]; then + GUI_ENABLED_ENGINES=reverse_dns,rdap,ipquery,spur,phishtank,threatfox,urlscan,google,github,ioc_one_html,ioc_one_pdf,abusix,hudsonrock +fi + +# Make GUI_ENABLED_ENGINES an environment variable +export GUI_ENABLED_ENGINES + options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit eval set -- "$options" diff --git a/src/ubuntu/install/cyberbro/install_cyberbro.sh b/src/ubuntu/install/cyberbro/install_cyberbro.sh index 5df71dca..0271e5d2 100644 --- a/src/ubuntu/install/cyberbro/install_cyberbro.sh +++ b/src/ubuntu/install/cyberbro/install_cyberbro.sh @@ -24,13 +24,6 @@ pip3 install -r requirements.txt deactivate -# Check if GUI_ENABLED_ENGINES is set else apply default -if [ -z ${GUI_ENABLED_ENGINES+x} ]; then - GUI_ENABLED_ENGINES=reverse_dns,rdap,ipquery,spur,phishtank,threatfox,urlscan,google,github,ioc_one_html,ioc_one_pdf,abusix,hudsonrock -fi - -export GUI_ENABLED_ENGINES - # Cleanup for app layer chown -R 1000:0 $HOME find /usr/share/ -name "icon-theme.cache" -exec rm -f {} \;