Monthly Archives: January 2013

what servers am I running?

nmap localhost will tell you what ports are open:

Nmap scan report for localhost (127.0.0.1)
Host is up (0.00035s latency).
Not shown: 993 closed ports
PORT      STATE SERVICE
22/tcp    open  ssh
445/tcp   open  microsoft-ds
548/tcp   open  afp
631/tcp   open  ipp
3689/tcp  open  rendezvous
9001/tcp  open  tor-orport
10001/tcp open  scp-config

Nmap done: 1 IP address (1 host up) scanned in 3.74 seconds

but sudo lsof -i -n -P | grep LISTEN will tell you what's behind them. -i selects IPv4 and IPv6 sockets, -n turns off hostname translation, and -P turns off port name lookup, because the day /etc/services is correct or relevant will probably be the day the Sun burns out.

launchd       1           root   10u  IPv6 0x83483e3bed83a175      0t0    TCP *:548 (LISTEN)
launchd       1           root   11u  IPv4 0x83483e3bed84015d      0t0    TCP *:548 (LISTEN)
launchd       1           root   27u  IPv6 0x83483e3bed8399b5      0t0    TCP *:445 (LISTEN)
launchd       1           root   28u  IPv4 0x83483e3bed83f2ed      0t0    TCP *:445 (LISTEN)
launchd       1           root   33u  IPv6 0x83483e3bed8395d5      0t0    TCP [::1]:631 (LISTEN)
launchd       1           root   34u  IPv4 0x83483e3bed83ebb5      0t0    TCP 127.0.0.1:631 (LISTEN)
launchd       1           root   36u  IPv6 0x83483e3bed853175      0t0    TCP *:22 (LISTEN)
launchd       1           root   37u  IPv4 0x83483e3bed83e47d      0t0    TCP *:22 (LISTEN)
kdc          50           root    6u  IPv6 0x83483e3bed852d95      0t0    TCP *:88 (LISTEN)
SpotifyWe   627      jehrhardt    6u  IPv4 0x83483e3befe90bb5      0t0    TCP 127.0.0.1:4370 (LISTEN)
SpotifyWe   627      jehrhardt    7u  IPv4 0x83483e3befe9047d      0t0    TCP 127.0.0.1:4380 (LISTEN)
Spotify     637      jehrhardt   11u  IPv4 0x83483e3bed83d60d      0t0    TCP 127.0.0.1:4381 (LISTEN)
Spotify     637      jehrhardt   12u  IPv4 0x83483e3befe912ed      0t0    TCP 127.0.0.1:4371 (LISTEN)
Spotify     637      jehrhardt   26u  IPv4 0x83483e3c00bd1ed5      0t0    TCP *:32740 (LISTEN)
Spotify     637      jehrhardt   30u  IPv4 0x83483e3bf35eea25      0t0    TCP *:57621 (LISTEN)
Dropbox     639      jehrhardt   19u  IPv4 0x83483e3befe8eed5      0t0    TCP *:17500 (LISTEN)
Dropbox     639      jehrhardt   25u  IPv4 0x83483e3befe8e065      0t0    TCP 127.0.0.1:26164 (LISTEN)
ssh        2408      jehrhardt    6u  IPv6 0x83483e3bedb83175      0t0    TCP [::1]:54334 (LISTEN)
ssh        2408      jehrhardt    7u  IPv4 0x83483e3c07168a25      0t0    TCP 127.0.0.1:54334 (LISTEN)
python    11368      jehrhardt    5u  IPv4 0x83483e3c0182ca25      0t0    TCP 127.0.0.1:51637 (LISTEN)
AptanaStu 11507      jehrhardt  151u  IPv6 0x83483e3c00dbc9b5      0t0    TCP 127.0.0.1:8020 (LISTEN)
AptanaStu 11507      jehrhardt  162u  IPv6 0x83483e3bef15fd95      0t0    TCP *:9980 (LISTEN)
AptanaStu 11507      jehrhardt  200u  IPv6 0x83483e3c00dbcd95      0t0    TCP *:10001 (LISTEN)
AptanaStu 11507      jehrhardt  201u  IPv6 0x83483e3c00dbc5d5      0t0    TCP *:9001 (LISTEN)
AptanaStu 11507      jehrhardt  329u  IPv6 0x83483e3bed30b9b5      0t0    TCP *:51636 (LISTEN)
iTunes    21480      jehrhardt   39u  IPv4 0x83483e3c01b30ed5      0t0    TCP *:3689 (LISTEN)
iTunes    21480      jehrhardt   40u  IPv6 0x83483e3bed8529b5      0t0    TCP *:3689 (LISTEN)
Skype     37217      jehrhardt   50u  IPv4 0x83483e3c0053ed45      0t0    TCP *:62671 (LISTEN)
memcached 85144      jehrhardt   18u  IPv6 0x83483e3bed30c175      0t0    TCP [::1]:11211 (LISTEN)
memcached 85144      jehrhardt   19u  IPv4 0x83483e3c07156bb5      0t0    TCP 127.0.0.1:11211 (LISTEN)
memcached 85144      jehrhardt   20u  IPv6 0x83483e3c00dbd175      0t0    TCP [fe80:1::1]:11211 (LISTEN)
Advertisements

animated GIFs from Sea of Dreams

# trim and scale down in QuickTime Player
# FFMPEG: r = 10 FPS
ffmpeg -i the-colors.mov -r 10 -pix_fmt rgb24 the-colors.%04d.png
# ImageMagick: delay = 10/100 of a second between frames
convert -delay 10 the-colors.*.png the-colors.gif

Doesn’t take advantage of any of the intra-frame GIF optimizations, or a global color table, so the output is huge (~10 MiBs for 4 seconds), but the animated GIF is the haiku of the 20th century: a format defined by its limitations.

WordPress rewrites image tags to a scaled version which fits the theme width, so click to see the originals if these don’t animate.


colors-1


colors-2