This commit is contained in:
Lol3rrr
2026-10-10 14:36:21 +02:00
commit bf59bd4c80
13 changed files with 458 additions and 0 deletions

1
traces/README.md Normal file
View File

@@ -0,0 +1 @@
# Traces

Binary file not shown.

27
traces/trace.sh Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -xe
DB_CONTAINER_ID=$(docker run -d -e POSTGRES_PASSWORD=test postgres:18)
echo $DB_CONTAINER_ID
mkdir -p output/
TRACE_CONTAINER_ID=$(docker run --rm \
--network container:$DB_CONTAINER_ID \
--cap-add NET_RAW \
--cap-add NET_ADMIN \
-v "$PWD/output:/captures" \
-d \
nicolaka/netshoot \
tcpdump -i lo -nn -U -w /captures/container.pcap)
sleep 3
echo "SELECT 1;" | docker run --rm --network container:$DB_CONTAINER_ID -i postgres:18 psql -h localhost -p 5432 -U postgres;
sleep 3
docker stop $TRACE_CONTAINER_ID
docker stop $DB_CONTAINER_ID