Here are a couple of scripts that make it easy to download (music) streams from the internet.

There are three programs in the archive:

  • This script sniffs the network for URLs.
  • This script invokes and filters for a user-defined extention. It dumps the output in a user-defined file.
  • This script reads the file given by, downloads the streams and extracts the mp3 audio data.

Usage is fairly easy, just run:

  sh extention filename

as root and navigate to the streams with your browser. Each time a new stream is discovered it is shown on standard output and it is written to the output file. If all streams have been discovered, you can invoke: filename

as a normal user to download the streams and extract the audio.

These scripts depend on mplayer, wget, grep, tee, sed, cut, id, and tcpdump.

When extracting other types of media, a simmilar program to must be written. If you don't know what extention to filter for, you can run (as root), to dump all URLs accessed by your browser.