Streamdump

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

There are three programs in the archive:

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

Usage is fairly easy, just run:

  sh streamget.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:

  mp3stream.sh 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 mp3stream.sh must be written. If you don't know what extention to filter for, you can run showurl.sh (as root), to dump all URLs accessed by your browser.