forked from its-a-feature/Mythic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus_check.sh
More file actions
executable file
·42 lines (41 loc) · 1.12 KB
/
status_check.sh
File metadata and controls
executable file
·42 lines (41 loc) · 1.12 KB
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
35
36
37
38
39
40
41
42
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "[-] Please run as root"
exit
fi
echo "Core mythic services: mythic_server, mythic_postgres, mythic_rabbitmq, documentation"
docker ps -a --filter name=mythic_server --filter name=mythic_postgres --filter name=mythic_rabbitmq --filter name=documentation
echo ""
echo "C2_Profile endpoints"
profiles=(./C2_Profiles/*)
filter_string=""
for p in "${profiles[@]}"
do
realpath=$(realpath "$p")
p=$(echo "${p/.\/C2_Profiles\//}")
tag=$(echo "$p" | tr '[:upper:]' '[:lower:]')
tag=$(echo "${tag/' '/}")
tag=$(echo "${tag/'_'/}")
if [ -d "$realpath" ]
then
filter_string=$(echo "$filter_string --filter name=^/$tag\$")
fi
done
docker ps -a $filter_string
echo ""
echo "Payload Type Endpoints"
profiles=(./Payload_Types/*)
filter_string=""
for p in "${profiles[@]}"
do
realpath=$(realpath "$p")
p=$(echo "${p/.\/Payload_Types\//}")
tag=$(echo "$p" | tr '[:upper:]' '[:lower:]')
tag=$(echo "${tag/' '/}")
tag=$(echo "${tag/'_'/}")
if [ -d "$realpath" ]
then
filter_string=$(echo "$filter_string --filter name=^/$tag\$")
fi
done
docker ps -a $filter_string