Saving MP3 streams from MySpace

Yesterday I got a newsletter from my favorite artist, Maria Taylor. I went to her MySpace site and saw the music player with two new songs I did not own yet! Keeping Firefox and Flash player running all day, I could listen to the music again and again and again and again. The problem: At home, there is no stable nor fast internet connection required to stream the data. So what now?

I fired up WireShark and started capturing packets. Then I pressed the play button in the flash player, waited until the stream was fully transferred and stopped packet capture. I filtered for "http" and saw one single line that was of interest for me:

HTTP/1.1 200 OK (audio/mpeg)

Now the lower left screen (packet details) contained an entry "Reassembled TCP Segments". A simple right mouse click on it, "Export selected packet bytes" into a file. Now I opened the file with my favorite editor on command line, joe, and removed the HTTP header data including that first empty line.

Now I can listen to the new songs - albeit in crappy 96kbit/s and 22kHz - all day until the album is out and I can buy it!

Written by Christian Weiske.

Comments? Please send an e-mail.