Skip to content

Instantly share code, notes, and snippets.

@zas
Created May 17, 2021
Embed
What would you like to do?
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