Skip to content

Instantly share code, notes, and snippets.

@zas
Created May 17, 2021 13:04
Show Gist options
  • Save zas/5bf6adcac4da78cd158ef32e0251f1ed to your computer and use it in GitHub Desktop.
Save zas/5bf6adcac4da78cd158ef32e0251f1ed to your computer and use it in GitHub Desktop.
sonar-like icmp ping

Sonic Ping

Emit a sound on each icmp reply.

Requirements

sudo apt install tcpdump sox

Sound

In one terminal:

while true; do sudo tcpdump -v -nn -i eno1 -c 1 'icmp and icmp[icmptype] == icmp-echoreply' && play -q -n -c 2 synth 2 sin 880 synth 2 sin fmod 1200 fade l 0 2 1.8 trim 0 1; done

Replace interface eno1 if needed.

Ping

In another terminal:

ping -i 2 targethost

Replace targethost with the host you want to ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment