forked from its-a-feature/Mythic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus_check.sh
executable file
·37 lines (37 loc) · 1022 Bytes
/
status_check.sh
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
#!/bin/bash
echo "Core apfell services: apfell_apfell, apfell_postgres, apfell_rabbitmq"
docker ps -a --filter name=apfell_apfell --filter name=apfell_postgres --filter name=apfell_rabbitmq
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