Tuesday, January 12, 2016

Spotify Ad Blocking

Level: Intermediate

If anyone is familiar with the app Spotify, you will know that it loves to play long and irritating ads during the course of playing music. Granted, the app is very useful and handy because it plays whatever songs you want, similar to iTunes. The only catch is you get quite a bit of ad play, including picture, audio, and video ads.



So, one day I was getting really really tired of listening to Spotify ads. I decided once and for all I'd figure out how to exploit this app and remove the ads. After extensive searching, I discovered a way to completely block all the ads on Spotify, without removing any quality from the music. It basically played music like iTunes, but with 0 ads.

First of all, I DO NOT endorse using this method for regular use. Repeat, do NOT ENDORSE. I don't know if blocking ads on this app is specifically illegal, because the ads are still trying to be delivered to your computer. You just don't see them. Personally, Spotify doesn't make any money with their ads on me, because I am not interested in new underwear, snacks, or auto parts while I'm studying. Anyway, I only post this because it is educational and useful for learning about the benefits of working with the hosts file.

So, down to the dirty nuts and bolts. This method really is very simple, with only a couple steps.

It all boils down to your hosts file. If you are unfamiliar with this file, it is located in

"C:\Windows\System32\drivers\etc" on most computers.

The hosts file basically acts as name resolution. Your computer always references this file before going out to the internet. Usually this file has no entries, but in this case all you need to do is open the file with notepad and insert these 2 lines of code at the bottom:

0.0.0.0 pubads.g.doubleclick.net
0.0.0.0 securepubads.g.doubleclick.net

The links are what Spotify uses to download ads onto your computer. By adding the 0.0.0.0 in front of each one, it makes Spotify attempt to go to that IP of 0.0.0.0 instead of a legitimate address.

Save the file and restart Spotify.

BAM.

NO MORE ADS.

It really is that simple. I never thought exploiting this app would be so easy. I also figured out a way to enable high quality streaming, but that is for another post. Again though, I don't support using this method and I only tried it for educational purposes. Have fun and happy listening!

Source: https://github.com/Xeroday/Spotify-Ad-Blocker/

No comments:

Post a Comment