Skip to content

Instantly share code, notes, and snippets.

@RyanBreaker
Created March 13, 2017 23:10
Show Gist options
  • Select an option

  • Save RyanBreaker/de374bb3240925a049bcc7c934f80a28 to your computer and use it in GitHub Desktop.

Select an option

Save RyanBreaker/de374bb3240925a049bcc7c934f80a28 to your computer and use it in GitHub Desktop.
#!/bin/bash
function ctrl_c() {
echo Quitting...
sudo kill -s SIGTERM $pid
exit 0
}
trap ctrl_c INT
sudo dnscap -w cap -W .pcap -s i -b
pid=$!
while true; do
ls -lh *.pcap.part
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment