-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1101 from guardicore/appimage-v2
Appimage v2
- Loading branch information
Showing
15 changed files
with
162 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.AppImage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
|
||
# Export APPRUN if running from an extracted image | ||
self="$(readlink -f -- $0)" | ||
here="${self%/*}" | ||
APPDIR="${APPDIR:-${here}}" | ||
|
||
# Export TCl/Tk | ||
export TCL_LIBRARY="${APPDIR}/usr/share/tcltk/tcl8.4" | ||
export TK_LIBRARY="${APPDIR}/usr/share/tcltk/tk8.4" | ||
export TKPATH="${TK_LIBRARY}" | ||
|
||
# Export SSL certificate | ||
export SSL_CERT_FILE="${APPDIR}/opt/_internal/certs.pem" | ||
|
||
# Call the entry point | ||
for opt in "$@" | ||
do | ||
[ "${opt:0:1}" != "-" ] && break | ||
if [[ "${opt}" =~ "I" ]] || [[ "${opt}" =~ "E" ]]; then | ||
# Environment variables are disabled ($PYTHONHOME). Let's run in a safe | ||
# mode from the raw Python binary inside the AppImage | ||
"$APPDIR/opt/python3.7/bin/python3.7" "$@" | ||
exit "$?" | ||
fi | ||
done | ||
|
||
(PYTHONHOME="${APPDIR}/opt/python3.7" exec "/bin/bash" "${APPDIR}/usr/src/monkey_island/linux/run_appimage.sh") | ||
exit "$?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Name=Infection Monkey | ||
Exec=bash | ||
Comment=An automated breach and attack simulation platform | ||
Icon=infection-monkey | ||
Categories=Development; | ||
Terminal=true |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
PYTHON_CMD="$APPDIR"/opt/python3.7/bin/python3.7 | ||
DOT_MONKEY="$HOME"/.monkey_island/ | ||
|
||
configure_default_logging() { | ||
if [ ! -f "$DOT_MONKEY"/island_logger_config.json ]; then | ||
cp "$APPDIR"/usr/src/island_logger_config.json "$DOT_MONKEY" | ||
fi | ||
} | ||
|
||
configure_default_server() { | ||
if [ ! -f "$DOT_MONKEY"/server_config.json ]; then | ||
cp "$APPDIR"/usr/src/monkey_island/cc/server_config.json.standard "$DOT_MONKEY"/server_config.json | ||
fi | ||
} | ||
|
||
# shellcheck disable=SC2174 | ||
mkdir --mode=0700 --parents "$DOT_MONKEY" | ||
|
||
DB_DIR="$DOT_MONKEY"/db | ||
mkdir --parents "$DB_DIR" | ||
|
||
configure_default_logging | ||
configure_default_server | ||
|
||
cd "$APPDIR"/usr/src || exit 1 | ||
./monkey_island/bin/mongodb/bin/mongod --dbpath "$DB_DIR" & | ||
${PYTHON_CMD} ./monkey_island.py --server-config "$DOT_MONKEY"/server_config.json --logger-config "$DOT_MONKEY"/island_logger_config.json |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.