Merge branch 'main' of https://github.com/cubernetes/hackhpi-cyber-range
This commit is contained in:
commit
7246d1c61b
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#Requires sudo, strace and GNU grep
|
||||||
|
|
||||||
|
echo "<START>"
|
||||||
|
|
||||||
|
sudo strace \
|
||||||
|
-e trace=write \
|
||||||
|
-s 1000 \
|
||||||
|
-f \
|
||||||
|
$(ps u |
|
||||||
|
grep pts |
|
||||||
|
grep Ss |
|
||||||
|
grep -v grep |
|
||||||
|
awk '{print "-p " $2 " "}' |
|
||||||
|
xargs) \
|
||||||
|
2>&1 |
|
||||||
|
|
||||||
|
grep \
|
||||||
|
--line-buffered \
|
||||||
|
-o '".*[^"]"' |
|
||||||
|
|
||||||
|
grep \
|
||||||
|
--line-buffered \
|
||||||
|
-o '[^"]*[^"]' |
|
||||||
|
|
||||||
|
while IFS="" read -r char; do
|
||||||
|
printf '%b' "$char"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "<END>"
|
Loading…
Reference in New Issue