-
-
Save minkione/f255e2cb81036ba5f146b2421edf046d to your computer and use it in GitHub Desktop.
Setup Java RMI registry and parse RMI calls.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# haqpl | |
# https://aweirdimagination.net/2020/06/28/kill-child-jobs-on-script-exit/ | |
cleanup() { | |
# kill all processes whose parent is this process | |
pkill -P $$ | |
} | |
for sig in INT QUIT HUP TERM; do | |
trap " | |
cleanup | |
trap - $sig EXIT | |
kill -s $sig "'"$$"' "$sig" | |
done | |
trap cleanup EXIT | |
rmiregistry 1098 & | |
socat TCP4-LISTEN:$1,fork TCP6:[::1]:1098 | sudo tshark -i $2 -T fields -Y "rmi.outputstream.message == 0x50" -e "rmi.serialization_data" > rmi_calls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment