Is Discord Running?
...
var ws = new WebSocket('ws://127.0.0.1:6463');
ws.addEventListener('open', function(e) {
// YES
});
ws.addEventListener('error', function(e) {
// NO
});
The Discord client exposes a local RPC server on port 6463.
This allows websites to use the WebSocket API to detect which visitors have the Discord client running - or not.
This short post was inspired by "Why is This Website Port Scanning me?" - a blog post that calls out websites that port-scan their visitors for fingerprinting purposes.
Correction: Discord will try to bind to a port in the range of [6463, 6472].