mirror of
https://github.com/SpecterOps/Nemesis
synced 2026-06-08 12:36:42 +00:00
ba0f3ce6c0
more test examples, readd registry/service objects fix agentmapping, process, host fix env settings add DB files update tables, ruff, formatting, lots of changes... Merge remote-tracking branch 'origin/main' into host_analysis return raw HTLM on landing page and more...
19 lines
490 B
Bash
Executable File
19 lines
490 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "Runs bash or other commands in a pod. Usage: ./interact.sh <pod_name> [commands]"
|
|
echo " interact.sh pgadmin"
|
|
echo " interact.sh pgadmin -c pgadmin -- /bin/sh"
|
|
else
|
|
POD_NAME=$(kubectl get pod -A | grep -v Terminating | grep $1 | awk '{print $2}')
|
|
|
|
# check for more than two arguments
|
|
if [ $# -gt 2 ]
|
|
then
|
|
kubectl logs -f --tail=0 $POD_NAME ${@:1}
|
|
else
|
|
kubectl logs -f --tail=0 $POD_NAME
|
|
fi
|
|
fi
|