29 lines
544 B
Bash
Executable File
29 lines
544 B
Bash
Executable File
#!/bin/sh
|
|
if [ ! "$1" ]; then
|
|
echo "Usage: $0 DOMAIN"
|
|
exit 1
|
|
fi
|
|
|
|
domain="$1"
|
|
sudo echo
|
|
|
|
tempdir=$(mktemp -d)
|
|
rm -f /tmp/keys
|
|
sudo rm -f /tmp/chrome.pcapng
|
|
|
|
sudo tshark -Q -a duration:10 -w /tmp/chrome.pcapng &
|
|
tsharkpid=$!
|
|
sleep 1
|
|
|
|
google-chrome --user-data-dir="$tempdir" --ssl-key-log-file=/tmp/keys --no-default-browser-check --no-first-run --disable-quic "https://$domain/" &
|
|
chromepid=$!
|
|
|
|
sleep 10
|
|
kill $chromepid
|
|
rm -rf "$tempdir"
|
|
|
|
wait $tsharkpid
|
|
sudo chmod +r /tmp/chrome.pcapng
|
|
|
|
./parse-pcap-stream.py /tmp/chrome.pcapng "$domain"
|