Posted by admin
Wed, 28 Jul 2010 15:01:00 GMT
For some reason, the "-o" option is missing from netstat on OS X Snow Leopard (10.6.4, anyway), so if you need to know which processes are using a given port, try:
sudo lsof -i -P | grep 36364
Of course substitute your own port number (36364 is used by Skype, btw).
Posted in Command line | Tags command, grep, line, lsof, netstat, o, OS, port, process, using, X | no comments | no trackbacks
Posted by admin
Sun, 11 Jul 2010 15:01:00 GMT
chuck: http://chuck.cs.princeton.edu/
ngrep: http://ngrep.sourceforge.net/
Using chuck and ngrep, you can translate the ascii output of ngrep into midi sounds in real time by reading from a file with chuck which is being appended by ngrep:
sudo ngrep -d en1 '' > network
chuck listen.ck < network
listen.ck source:
// computer key input, with sound
KBHit kb;
// patch
Impulse i => BiQuad f => dac;
// set the filter’s pole radius
.99 => f.prad;
// set equal gain zeros
1 => f.eqzs;
// initialize float variable
0.0 => float v;
// set filter gain
.5 => f.gain;
// time-loop
while( true )
{
// wait on event
kb => now;
// generate impulse
1.0 => i.next;
// loop through 1 or more keys
while( kb.more() )
{
// set filter freq
kb.getchar() => int c;
if(c < 58) 58 %=> c;
if(c > 120) 120 %=> c;
c => Std.mtof => f.pfreq;
// print int value
<<< “ascii:”, c >>>;
}
}
Sounds a bit like a colorful geiger counter.
Maybe you can ngrep for something specific and learn to recognize the sound of it amongst other traffic.
Posted in Command line, Obscure | Tags ascii, audio, BEEP, bleep, blorp, boop, chuck, geiger, internet, listen, listening, monitoring, network, ngrep, to, traffic | no comments | no trackbacks