Skip to content

Commit

Permalink
block ads from facebook
Browse files Browse the repository at this point in the history
  • Loading branch information
iostream authored and iostream committed Aug 17, 2020
1 parent 1eae04e commit d72d03f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h4 align="center">A multi-purpose adblocker and skip bypass for the <strong>Windows</strong> Spotify Desktop Application.</h4>
<h5 align="center">Please support Spotify by purchasing premium</h5>
<p align="center">
<strong>Last updated:</strong> 18 July 2020<br>
<strong>Last updated:</strong> 17 August 2020<br>
<strong>Last tested version:</strong> 1.1.39.612.g1e7e78a4
</p>
</center>
Expand Down
14 changes: 7 additions & 7 deletions src/hosts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ std::wofstream logging;

_getaddrinfo getaddrinfo_orig;

const std::array<std::string, 4> blockList = { "google", "doubleclick", "qualaroo.com" , "fbsbx.com" };

// check if ads hostname
bool is_blockhost (const char* nodename) {

std::string nnodename (nodename);

if (0 == nnodename.compare ("wpad"))
return g_skip_wpad ? true : false;

if (std::string::npos != nnodename.find ("google"))
return true;
if (std::string::npos != nnodename.find ("doubleclick"))
return true;
if (std::string::npos != nnodename.find ("qualaroo.com"))
return true;
for (auto i : blockList) {
if (std::string::npos != nnodename.find (i))
return true;
}
return false;
}

Expand Down
1 change: 1 addition & 0 deletions src/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <winsock2.h>
#include <Psapi.h>

#include <array>
#include <fstream>
#include <future>

Expand Down

0 comments on commit d72d03f

Please sign in to comment.