diff --git a/README.md b/README.md index aa4d651..e47c5c3 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,18 @@ Please do support Spotify by using premium!!!! ## Video, audio & banner adblock/skip for Spotify -**Current Version:** 0.20 +**Current Version:** 0.21 -**Last updated:** 22 August 2019 +**Last updated:** 13 September 2019 -**Last tested version:** 1.1.12.451.gdb77255f +**Last tested version:** 1.1.14.475.g566c8beb ### Important Notice +Not tested on 1.1.15.448.g00fba0e3 yet, + +since it not public release in my region yet + This dll is virus free, You can check and recompile it from source. @@ -31,12 +35,12 @@ You can check and recompile it from source. The default Spotify installation location is: %APPDATA%/Spotify (copy and paste into Explorer address bar) -[Download](chrome_elf.dll) +[Download](chrome_elf.zip) #### Installation/Update: 1. Browse to Spotify installation folder (where Spotify.exe there) 2. backup existing chrome_elf.dll by rename it (e.g. chrome_elf.bak) -3. and drop chrome_elf.dll. +3. and extract chrome_elf.dll from chrome_elf.zip to that folder. #### Uninstall: 1. Browse to Spotify installation folder (where Spotify.exe there) diff --git a/chrome_elf.dll b/chrome_elf.dll deleted file mode 100644 index f226d93..0000000 Binary files a/chrome_elf.dll and /dev/null differ diff --git a/chrome_elf.zip b/chrome_elf.zip new file mode 100644 index 0000000..19cd4d0 Binary files /dev/null and b/chrome_elf.zip differ diff --git a/src/BlockTheSpot.cpp b/src/BlockTheSpot.cpp index e5516d5..7c92e01 100644 --- a/src/BlockTheSpot.cpp +++ b/src/BlockTheSpot.cpp @@ -11,9 +11,9 @@ int CrashForException_ExportThunk (EXCEPTION_POINTERS* info) { } void DisableHook () {} -uint32_t DrainLog (uint8_t* buffer, - uint32_t buffer_size, - uint32_t* log_remaining) { +UINT32 DrainLog (UINT8* buffer, + UINT32 buffer_size, + UINT32* log_remaining) { return 0; } @@ -25,8 +25,8 @@ bool DumpHungProcessWithPtype_ExportThunk (HANDLE process_handle, void DumpProcessWithoutCrash (void* task_port) {} -int32_t GetApplyHookResult () { return 0; } -uint32_t GetBlockedModulesCount () { return 0; } +INT32 GetApplyHookResult () { return 0; } +UINT32 GetBlockedModulesCount () { return 0; } size_t GetCrashReports_ExportThunk (void* reports, size_t reports_size) { @@ -39,8 +39,8 @@ const wchar_t* GetCrashpadDatabasePath_ExportThunk () { void* GetHandleVerifier () { return NULL; } -uint32_t GetInstallDetailsPayload () { return 0; } -uint32_t GetUniqueBlockedModulesCount () { return 0; } +UINT32 GetInstallDetailsPayload () { return 0; } +UINT32 GetUniqueBlockedModulesCount () { return 0; } bool GetUserDataDirectoryThunk (wchar_t* user_data_dir, size_t user_data_dir_length, wchar_t* invalid_user_data_dir, diff --git a/src/BlockTheSpot.vcxproj b/src/BlockTheSpot.vcxproj index e0134a2..b06b411 100644 --- a/src/BlockTheSpot.vcxproj +++ b/src/BlockTheSpot.vcxproj @@ -72,12 +72,13 @@ MaxSpeed - false + true WIN32;NDEBUG;_WINDOWS;_USRDLL;BLOCKTHESPOT_EXPORTS;%(PreprocessorDefinitions) MultiThreaded None - Size + Speed AnySuitable + false Windows diff --git a/src/dllmain.cpp b/src/dllmain.cpp index b1ec485..84a1448 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -1,90 +1,6 @@ // dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" -LPVOID Search (char* pPattern, size_t patternSize, uint8_t* scanStart, size_t scanSize) -{ - __try - { - auto res = std::search ( - scanStart, scanStart + scanSize, pPattern, pPattern + patternSize, - [](uint8_t val1, uint8_t val2) { return (val1 == val2); } - ); - - return (res >= scanStart + scanSize) ? nullptr : res; - } - __except (EXCEPTION_EXECUTE_HANDLER) { - return nullptr; - } -} - -LPVOID FindFunction (char* hModule, DWORD hModuleSize, char* midFuncPtn, int lenMidFuncPtn, int seekBackCount, char* startFuncPtn, int lenStartFuncPtn) -{ - LPVOID pfnAddr = Search (midFuncPtn, lenMidFuncPtn, (uint8_t*)hModule, hModuleSize); - if (!pfnAddr) return NULL; - char* pfnStart = NULL; - char* pfnCurrent = (char*)pfnAddr - seekBackCount; - while ((pfnCurrent = (char*)Search (startFuncPtn, lenStartFuncPtn, (uint8_t*)pfnCurrent, hModule + hModuleSize - pfnCurrent)) && - pfnCurrent < pfnAddr) - { - pfnStart = pfnCurrent; - pfnCurrent++; - } - - return pfnStart; -} - -// https://www.unknowncheats.me/forum/1064672-post23.html -bool DataCompare (BYTE* pData, BYTE* bSig, char* szMask) -{ - for (; *szMask; ++szMask, ++pData, ++bSig) - { - if (*szMask == 'x' && *pData != *bSig) - return false; - } - return (*szMask) == NULL; -} - -BYTE* FindPattern (BYTE* dwAddress, DWORD dwSize, BYTE* pbSig, char* szMask) -{ - DWORD length = strlen (szMask); - for (DWORD i = NULL; i < dwSize - length; i++) - { - __try - { - if (DataCompare (dwAddress + i, pbSig, szMask)) - return dwAddress + i; - } - __except (EXCEPTION_EXECUTE_HANDLER) { - return nullptr; - } - } - return 0; -} - -DWORD WINAPI MainThread (LPVOID) -{ - HMODULE hModule = GetModuleHandle (NULL); - MODULEINFO mInfo = { 0 }; - if (GetModuleInformation (GetCurrentProcess (), hModule, &mInfo, sizeof (MODULEINFO))) { - - LPVOID skipPod = FindPattern ((uint8_t*)hModule, mInfo.SizeOfImage, (BYTE*) "\xFF\x07\x0F\x85\x00\x00\x00\x00\xE8", "xxxx????x"); - - if (skipPod) - { - DWORD oldProtect; - VirtualProtect ((char*)skipPod + 2, 1, PAGE_EXECUTE_READWRITE, &oldProtect); - memset ((char*)skipPod + 2, 0x90, 1); - VirtualProtect ((char*)skipPod + 2, 1, oldProtect, &oldProtect); - - VirtualProtect ((char*)skipPod + 3, 1, PAGE_EXECUTE_READWRITE, &oldProtect); - memset ((char*)skipPod + 3, 0xE9, 1); - VirtualProtect ((char*)skipPod + 3, 1, oldProtect, &oldProtect); - } - - } - return 0; -} - BOOL APIENTRY DllMain (HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved @@ -94,20 +10,10 @@ BOOL APIENTRY DllMain (HMODULE hModule, { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls (hModule); - // Only patch the main process and none of the other - if (!wcsstr (GetCommandLine (), L"--type=")) { - //skip processing ads but ads still downloaded - CreateThread (NULL, NULL, MainThread, NULL, 0, NULL); - } - if (wcsstr (GetCommandLine (), L"--url=")) { - exit (0); - } // block the ads banner by hostname InstallHookApi ("ws2_32.dll", "getaddrinfo", getaddrinfohook); // real ads block InstallHookApi ("Winhttp.dll", "WinHttpOpenRequest", winhttpopenrequesthook); - // for future - //InstallHookApi ("ws2_32.dll", "connect", connecthook); break; } return TRUE; diff --git a/src/hosts.cpp b/src/hosts.cpp index 25e4f30..3237dcb 100644 --- a/src/hosts.cpp +++ b/src/hosts.cpp @@ -1,6 +1,6 @@ #include "stdafx.h" -#include "hosts.h" +//HINTERNET int WINAPI winhttpopenrequesthook (DWORD RetAddr, pfnwinhttpopenrequest fnwinhttpopenrequest, HINTERNET hConnect, @@ -11,44 +11,17 @@ int WINAPI winhttpopenrequesthook (DWORD RetAddr, LPCWSTR* ppwszAcceptTypes, DWORD dwFlags) { - //wcscmp (pwszVerb, L"POST") == 0 - if (wcscmp (pwszObjectName, L"/ad-logic/flashpoint") == 0) - return NULL; - if (wcscmp (pwszObjectName, L"/ads") == 0) - return NULL; - //if (wcscmp (pwszObjectName, L"/ads/v1/ads/leaderboard") == 0) + return NULL; + //if ((wcscmp (pwszVerb, L"GET") == 0) || (wcscmp (pwszVerb, L"POST") == 0)) //return NULL; - return fnwinhttpopenrequest (hConnect, - pwszVerb, - pwszObjectName, - pwszVersion, - pwszReferrer, - ppwszAcceptTypes, - dwFlags); -} - -int WINAPI connecthook (DWORD RetAddr, - pfnconnect fnconnect, - SOCKET s, - const struct sockaddr* name, - int namelen) -{ - return fnconnect (s, name, namelen); - - //for future whitelist or blacklist ip - //struct sockaddr_in* sa = (struct sockaddr_in*)name; - //if (sa->sin_family != AF_INET) // check only IPv4 - //return fnconnect (s, name, namelen); - - - //char* allowip = "151.101.8.246"; // Image - //char ipstr[INET_ADDRSTRLEN]; - //inet_ntop (sa->sin_family, &(sa->sin_addr), ipstr, INET_ADDRSTRLEN); - //if (_stricmp (ipstr, allowip) == 0) { - //return SOCKET_ERROR; - //} - + //return fnwinhttpopenrequest (hConnect, + // pwszVerb, + // pwszObjectName, + // pwszVersion, + // pwszReferrer, + // ppwszAcceptTypes, + // dwFlags); } int WINAPI getaddrinfohook (DWORD RetAddr, diff --git a/src/hosts.h b/src/hosts.h index e58e491..030a56b 100644 --- a/src/hosts.h +++ b/src/hosts.h @@ -1,13 +1,9 @@ #ifndef _HOSTS_H #define _HOSTS_H -typedef SOCKET (__stdcall* pfnconnect)(SOCKET s, - const struct sockaddr* name, - int namelen); - -typedef int (__stdcall* pfngetaddrinfo)(const char* nodename, - const char* servname, - const struct addrinfo* hints, +typedef int (__stdcall* pfngetaddrinfo)(const char* nodename, + const char* servname, + const struct addrinfo* hints, struct addrinfo** res); typedef int (__stdcall* pfnwinhttpopenrequest)(HINTERNET hConnect, @@ -29,474 +25,469 @@ int WINAPI winhttpopenrequesthook (DWORD RetAddr, DWORD dwFlags ); -int WINAPI connecthook (DWORD RetAddr, - pfnconnect fnconnect, - SOCKET s, - const struct sockaddr* name, - int namelen); - -int WINAPI getaddrinfohook (DWORD RetAddr, - pfngetaddrinfo fngetaddrinfo, - const char* nodename, - const char* servname, - const struct addrinfo* hints, +int WINAPI getaddrinfohook (DWORD RetAddr, + pfngetaddrinfo fngetaddrinfo, + const char* nodename, + const char* servname, + const struct addrinfo* hints, struct addrinfo** res); -static const char* blockhost[] = { -// fork this if you found more... I'll check if had time. - "google.ac", - "google.ad", - "google.af", - "google.ag", - "google.al", - "google.am", - "google.as", - "google.ba", - "google.bf", - "google.bg", - "google.bi", - "google.bj", - "google.bs", - "google.bt", - "google.by", - "google.cc", - "google.cd", - "google.cf", - "google.cg", - "google.ci", - "google.cm", - "google.cn", - "google.co.ao", - "google.co.bw", - "google.co.ck", - "google.co.cr", - "google.co.im", - "google.co.je", - "google.co.jp", - "google.co.ke", - "google.co.kr", - "google.co.ls", - "google.co.ma", - "google.co.mz", - "google.co.nz", - "google.co.tz", - "google.co.ug", - "google.co.uz", - "google.co.vi", - "google.co.zm", - "google.co.zw", - "google.com.af", - "google.com.ag", - "google.com.ai", - "google.com.ar", - "google.com.au", - "google.com.bd", - "google.com.bh", - "google.com.bn", - "google.com.bo", - "google.com.br", - "google.com.by", - "google.com.bz", - "google.com.cn", - "google.com.co", - "google.com.cu", - "google.com.cy", - "google.com.do", - "google.com.ec", - "google.com.eg", - "google.com.et", - "google.com.fj", - "google.com.ge", - "google.com.gh", - "google.com.gi", - "google.com.gr", - "google.com.gt", - "google.com.hk", - "google.com.iq", - "google.com.jm", - "google.com.jo", - "google.com.kh", - "google.com.kw", - "google.com.lb", - "google.com.ly", - "google.com.mm", - "google.com.mt", - "google.com.mx", - "google.com.my", - "google.com.na", - "google.com.nf", - "google.com.ng", - "google.com.ni", - "google.com.np", - "google.com.nr", - "google.com.om", - "google.com.pa", - "google.com.pe", - "google.com.pg", - "google.com.ph", - "google.com.pk", - "google.com.pl", - "google.com.pr", - "google.com.py", - "google.com.qa", - "google.com.ru", - "google.com.sa", - "google.com.sb", - "google.com.sg", - "google.com.sl", - "google.com.sv", - "google.com.tj", - "google.com.tn", - "google.com.tr", - "google.com.tw", - "google.com.ua", - "google.com.uy", - "google.com.vc", - "google.com.ve", - "google.com.vn", - "google.cv", - "google.dj", - "google.dm", - "google.ee", - "google.fm", - "google.ga", - "google.ge", - "google.gg", - "google.gl", - "google.gm", - "google.gp", - "google.gy", - "google.hk", - "google.hn", - "google.hr", - "google.ht", - "google.hu", - "google.im", - "google.iq", - "google.ir", - "google.is", - "google.it.ao", - "google.je", - "google.jo", - "google.jp", - "google.kg", - "google.ki", - "google.kz", - "google.la", - "google.li", - "google.lk", - "google.lt", - "google.lu", - "google.lv", - "google.md", - "google.me", - "google.mg", - "google.mk", - "google.ml", - "google.mn", - "google.ms", - "google.mu", - "google.mv", - "google.mw", - "google.ne", - "google.ne.jp", - "google.ng", - "google.nr", - "google.nu", - "google.off.ai", - "google.pk", - "google.pn", - "google.ps", - "google.rs", - "google.rw", - "google.sc", - "google.sh", - "google.si", - "google.sm", - "google.sn", - "google.so", - "google.sr", - "google.st", - "google.td", - "google.tg", - "google.tk", - "google.tl", - "google.tm", - "google.tn", - "google.to", - "google.tt", - "google.us", - "google.uz", - "google.vg", - "google.vu", - "google.ws", - "l.google.com", - "2mdn.net", - "adgoogle.net", - "admeld.com", - "admob.biz", - "admob.co.in", - "admob.co.kr", - "admob.co.nz", - "admob.co.uk", - "admob.co.za", - "admob.com", - "admob.com.br", - "admob.com.es", - "admob.com.fr", - "admob.com.mx", - "admob.com.pt", - "admob.de", - "admob.dk", - "admob.es", - "admob.fi", - "admob.fr", - "admob.gr", - "admob.hk", - "admob.ie", - "admob.in", - "admob.it", - "admob.jp", - "admob.kr", - "admob.mobi", - "admob.no", - "admob.ph", - "admob.pt", - "admob.sg", - "admob.tw", - "admob.us", - "admob.vn", - "adwhirl.com", - "ampproject.com", - "ampproject.net", - "ampproject.org", - "android.com", - "anycast-edge.metric.gstatic.com", - "anycast-stb.metric.gstatic.com", - "anycast.metric.gstatic.com", - "cdn.ampproject.org", - "chromecast.com", - "chromeexperiments.com", - "chromestatus.com", - "chromium.org", - "clients6.google.com", - "cloudendpointsapis.com", - "dartmotif.com", - "dartsearch.net", - "doubleclick.com", - "doubleclick.ne.jp", - "doubleclick.net", - "doubleclickusercontent.com", - "fls.doubleclick.net", - "g.co", - "g.doubleclick.net", - "ggpht.com", - "gmodules.com", - "goo.gl", - "google-syndication.com", - "google.cat", - "google.info", - "google.jobs", - "google.net", - "google.org", - "google.stackdriver.com", - "googleadapis.com", - "googleadservices.com", - "googleadsserving.cn", - "googlealumni.com", - "googleapis.cn", - "googleapps.com", - "googlecbs.com", - "googlecode.com", - "googlecommerce.com", - "googledrive.com", - "googleenterprise.com", - "googlefiber.com", - "googlefiber.net", - "googlegoro.com", - "googlehosted.com", - "googlepayments.com", - "googlesource.com", - "googlesyndication.com", - "googletagmanager.com", - "googletagservices.com", - "googleusercontent.com", - "googlezip.net", - "gstatic.cn", - "gstatic.com", - "gvt3.com", - "gvt9.com", - "picasa.com", - "recaptcha.net", - "stackdriver.com", - "stbcast-stb.metric.gstatic.com", - "stbcast.metric.gstatic.com", - "stbcast2-stb.metric.gstatic.com", - "stbcast2.metric.gstatic.com", - "stbcast3-stb.metric.gstatic.com", - "stbcast3.metric.gstatic.com", - "stbcast4-stb.metric.gstatic.com", - "stbcast4.metric.gstatic.com", - "unicast-edge.metric.gstatic.com", - "unicast-stb.metric.gstatic.com", - "unicast.metric.gstatic.com", - "unicast2-stb.metric.gstatic.com", - "unicast2.metric.gstatic.com", - "waze.com", - "withgoogle.com", - "youtu.be", - "youtube-3rd-party.com", - "youtube-nocookie.com", - "youtube.ae", - "youtube.al", - "youtube.am", - "youtube.at", - "youtube.az", - "youtube.ba", - "youtube.be", - "youtube.bg", - "youtube.bh", - "youtube.bo", - "youtube.ca", - "youtube.cat", - "youtube.ch", - "youtube.cl", - "youtube.co", - "youtube.co.ae", - "youtube.co.at", - "youtube.co.hu", - "youtube.co.id", - "youtube.co.il", - "youtube.co.in", - "youtube.co.jp", - "youtube.co.ke", - "youtube.co.kr", - "youtube.co.ma", - "youtube.co.nz", - "youtube.co.th", - "youtube.co.ug", - "youtube.co.uk", - "youtube.co.ve", - "youtube.co.za", - "youtube.com", - "youtube.com.ar", - "youtube.com.au", - "youtube.com.az", - "youtube.com.bh", - "youtube.com.bo", - "youtube.com.br", - "youtube.com.by", - "youtube.com.co", - "youtube.com.do", - "youtube.com.ee", - "youtube.com.eg", - "youtube.com.es", - "youtube.com.gh", - "youtube.com.gr", - "youtube.com.gt", - "youtube.com.hk", - "youtube.com.hr", - "youtube.com.jm", - "youtube.com.jo", - "youtube.com.kw", - "youtube.com.lb", - "youtube.com.lv", - "youtube.com.mk", - "youtube.com.mt", - "youtube.com.mx", - "youtube.com.my", - "youtube.com.ng", - "youtube.com.om", - "youtube.com.pe", - "youtube.com.ph", - "youtube.com.pk", - "youtube.com.pt", - "youtube.com.qa", - "youtube.com.ro", - "youtube.com.sa", - "youtube.com.sg", - "youtube.com.tn", - "youtube.com.tr", - "youtube.com.tw", - "youtube.com.ua", - "youtube.com.uy", - "youtube.com.ve", - "youtube.cz", - "youtube.de", - "youtube.dk", - "youtube.ee", - "youtube.es", - "youtube.fi", - "youtube.fr", - "youtube.ge", - "youtube.gr", - "youtube.gt", - "youtube.hk", - "youtube.hr", - "youtube.hu", - "youtube.ie", - "youtube.in", - "youtube.is", - "youtube.it", - "youtube.jo", - "youtube.jp", - "youtube.kr", - "youtube.lk", - "youtube.lt", - "youtube.lv", - "youtube.ma", - "youtube.md", - "youtube.me", - "youtube.mk", - "youtube.mx", - "youtube.my", - "youtube.ng", - "youtube.nl", - "youtube.no", - "youtube.pe", - "youtube.ph", - "youtube.pk", - "youtube.pl", - "youtube.pr", - "youtube.pt", - "youtube.qa", - "youtube.ro", - "youtube.rs", - "youtube.ru", - "youtube.sa", - "youtube.se", - "youtube.sg", - "youtube.si", - "youtube.sk", - "youtube.sn", - "youtube.tn", - "youtube.ua", - "youtube.ug", - "youtube.uy", - "youtube.vn", - "youtubeeducation.com", - "youtubemobilesupport.com", - "ytimg.com", - "accounts.google.com", - "apis.google.com", - "app.google.stackdriver.com", - "b.mail.google.com", - "chatenabled.mail.google.com", - "ddm.google.com", - "gmail.google.com", - "mail-attachment.googleusercontent.com", - "www.gmail.com", - "ad.doubleclick.net", - "redirector.googlevideo.com", - "beacons.gcp.gvt2.com", - "beacons.gvt2.com", - "beacons2.gvt2.com", - "beacons3.gvt2.com", - "beacons4.gvt2.com", - "beacons5.gvt2.com", - "beacons5.gvt3.com", - "clients2.google.com", - "crashdump.spotify.com" +static const char* blockhost[] = { + // fork this if you found more... I'll check if had time. + "google.ac", + "google.ad", + "google.af", + "google.ag", + "google.al", + "google.am", + "google.as", + "google.ba", + "google.bf", + "google.bg", + "google.bi", + "google.bj", + "google.bs", + "google.bt", + "google.by", + "google.cc", + "google.cd", + "google.cf", + "google.cg", + "google.ci", + "google.cm", + "google.cn", + "google.co.ao", + "google.co.bw", + "google.co.ck", + "google.co.cr", + "google.co.im", + "google.co.je", + "google.co.jp", + "google.co.ke", + "google.co.kr", + "google.co.ls", + "google.co.ma", + "google.co.mz", + "google.co.nz", + "google.co.tz", + "google.co.ug", + "google.co.uz", + "google.co.vi", + "google.co.zm", + "google.co.zw", + "google.com.af", + "google.com.ag", + "google.com.ai", + "google.com.ar", + "google.com.au", + "google.com.bd", + "google.com.bh", + "google.com.bn", + "google.com.bo", + "google.com.br", + "google.com.by", + "google.com.bz", + "google.com.cn", + "google.com.co", + "google.com.cu", + "google.com.cy", + "google.com.do", + "google.com.ec", + "google.com.eg", + "google.com.et", + "google.com.fj", + "google.com.ge", + "google.com.gh", + "google.com.gi", + "google.com.gr", + "google.com.gt", + "google.com.hk", + "google.com.iq", + "google.com.jm", + "google.com.jo", + "google.com.kh", + "google.com.kw", + "google.com.lb", + "google.com.ly", + "google.com.mm", + "google.com.mt", + "google.com.mx", + "google.com.my", + "google.com.na", + "google.com.nf", + "google.com.ng", + "google.com.ni", + "google.com.np", + "google.com.nr", + "google.com.om", + "google.com.pa", + "google.com.pe", + "google.com.pg", + "google.com.ph", + "google.com.pk", + "google.com.pl", + "google.com.pr", + "google.com.py", + "google.com.qa", + "google.com.ru", + "google.com.sa", + "google.com.sb", + "google.com.sg", + "google.com.sl", + "google.com.sv", + "google.com.tj", + "google.com.tn", + "google.com.tr", + "google.com.tw", + "google.com.ua", + "google.com.uy", + "google.com.vc", + "google.com.ve", + "google.com.vn", + "google.cv", + "google.dj", + "google.dm", + "google.ee", + "google.fm", + "google.ga", + "google.ge", + "google.gg", + "google.gl", + "google.gm", + "google.gp", + "google.gy", + "google.hk", + "google.hn", + "google.hr", + "google.ht", + "google.hu", + "google.im", + "google.iq", + "google.ir", + "google.is", + "google.it.ao", + "google.je", + "google.jo", + "google.jp", + "google.kg", + "google.ki", + "google.kz", + "google.la", + "google.li", + "google.lk", + "google.lt", + "google.lu", + "google.lv", + "google.md", + "google.me", + "google.mg", + "google.mk", + "google.ml", + "google.mn", + "google.ms", + "google.mu", + "google.mv", + "google.mw", + "google.ne", + "google.ne.jp", + "google.ng", + "google.nr", + "google.nu", + "google.off.ai", + "google.pk", + "google.pn", + "google.ps", + "google.rs", + "google.rw", + "google.sc", + "google.sh", + "google.si", + "google.sm", + "google.sn", + "google.so", + "google.sr", + "google.st", + "google.td", + "google.tg", + "google.tk", + "google.tl", + "google.tm", + "google.tn", + "google.to", + "google.tt", + "google.us", + "google.uz", + "google.vg", + "google.vu", + "google.ws", + "l.google.com", + "2mdn.net", + "adgoogle.net", + "admeld.com", + "admob.biz", + "admob.co.in", + "admob.co.kr", + "admob.co.nz", + "admob.co.uk", + "admob.co.za", + "admob.com", + "admob.com.br", + "admob.com.es", + "admob.com.fr", + "admob.com.mx", + "admob.com.pt", + "admob.de", + "admob.dk", + "admob.es", + "admob.fi", + "admob.fr", + "admob.gr", + "admob.hk", + "admob.ie", + "admob.in", + "admob.it", + "admob.jp", + "admob.kr", + "admob.mobi", + "admob.no", + "admob.ph", + "admob.pt", + "admob.sg", + "admob.tw", + "admob.us", + "admob.vn", + "adwhirl.com", + "ampproject.com", + "ampproject.net", + "ampproject.org", + "android.com", + "anycast-edge.metric.gstatic.com", + "anycast-stb.metric.gstatic.com", + "anycast.metric.gstatic.com", + "cdn.ampproject.org", + "chromecast.com", + "chromeexperiments.com", + "chromestatus.com", + "chromium.org", + "clients6.google.com", + "cloudendpointsapis.com", + "dartmotif.com", + "dartsearch.net", + "doubleclick.com", + "doubleclick.ne.jp", + "doubleclick.net", + "doubleclickusercontent.com", + "fls.doubleclick.net", + "g.co", + "g.doubleclick.net", + "ggpht.com", + "gmodules.com", + "goo.gl", + "google-syndication.com", + "google.cat", + "google.info", + "google.jobs", + "google.net", + "google.org", + "google.stackdriver.com", + "googleadapis.com", + "googleadservices.com", + "googleadsserving.cn", + "googlealumni.com", + "googleapis.cn", + "googleapps.com", + "googlecbs.com", + "googlecode.com", + "googlecommerce.com", + "googledrive.com", + "googleenterprise.com", + "googlefiber.com", + "googlefiber.net", + "googlegoro.com", + "googlehosted.com", + "googlepayments.com", + "googlesource.com", + "googlesyndication.com", + "googletagmanager.com", + "googletagservices.com", + "googleusercontent.com", + "googlezip.net", + "gstatic.cn", + "gstatic.com", + "gvt3.com", + "gvt9.com", + "picasa.com", + "recaptcha.net", + "stackdriver.com", + "stbcast-stb.metric.gstatic.com", + "stbcast.metric.gstatic.com", + "stbcast2-stb.metric.gstatic.com", + "stbcast2.metric.gstatic.com", + "stbcast3-stb.metric.gstatic.com", + "stbcast3.metric.gstatic.com", + "stbcast4-stb.metric.gstatic.com", + "stbcast4.metric.gstatic.com", + "unicast-edge.metric.gstatic.com", + "unicast-stb.metric.gstatic.com", + "unicast.metric.gstatic.com", + "unicast2-stb.metric.gstatic.com", + "unicast2.metric.gstatic.com", + "waze.com", + "withgoogle.com", + "youtu.be", + "youtube-3rd-party.com", + "youtube-nocookie.com", + "youtube.ae", + "youtube.al", + "youtube.am", + "youtube.at", + "youtube.az", + "youtube.ba", + "youtube.be", + "youtube.bg", + "youtube.bh", + "youtube.bo", + "youtube.ca", + "youtube.cat", + "youtube.ch", + "youtube.cl", + "youtube.co", + "youtube.co.ae", + "youtube.co.at", + "youtube.co.hu", + "youtube.co.id", + "youtube.co.il", + "youtube.co.in", + "youtube.co.jp", + "youtube.co.ke", + "youtube.co.kr", + "youtube.co.ma", + "youtube.co.nz", + "youtube.co.th", + "youtube.co.ug", + "youtube.co.uk", + "youtube.co.ve", + "youtube.co.za", + "youtube.com", + "youtube.com.ar", + "youtube.com.au", + "youtube.com.az", + "youtube.com.bh", + "youtube.com.bo", + "youtube.com.br", + "youtube.com.by", + "youtube.com.co", + "youtube.com.do", + "youtube.com.ee", + "youtube.com.eg", + "youtube.com.es", + "youtube.com.gh", + "youtube.com.gr", + "youtube.com.gt", + "youtube.com.hk", + "youtube.com.hr", + "youtube.com.jm", + "youtube.com.jo", + "youtube.com.kw", + "youtube.com.lb", + "youtube.com.lv", + "youtube.com.mk", + "youtube.com.mt", + "youtube.com.mx", + "youtube.com.my", + "youtube.com.ng", + "youtube.com.om", + "youtube.com.pe", + "youtube.com.ph", + "youtube.com.pk", + "youtube.com.pt", + "youtube.com.qa", + "youtube.com.ro", + "youtube.com.sa", + "youtube.com.sg", + "youtube.com.tn", + "youtube.com.tr", + "youtube.com.tw", + "youtube.com.ua", + "youtube.com.uy", + "youtube.com.ve", + "youtube.cz", + "youtube.de", + "youtube.dk", + "youtube.ee", + "youtube.es", + "youtube.fi", + "youtube.fr", + "youtube.ge", + "youtube.gr", + "youtube.gt", + "youtube.hk", + "youtube.hr", + "youtube.hu", + "youtube.ie", + "youtube.in", + "youtube.is", + "youtube.it", + "youtube.jo", + "youtube.jp", + "youtube.kr", + "youtube.lk", + "youtube.lt", + "youtube.lv", + "youtube.ma", + "youtube.md", + "youtube.me", + "youtube.mk", + "youtube.mx", + "youtube.my", + "youtube.ng", + "youtube.nl", + "youtube.no", + "youtube.pe", + "youtube.ph", + "youtube.pk", + "youtube.pl", + "youtube.pr", + "youtube.pt", + "youtube.qa", + "youtube.ro", + "youtube.rs", + "youtube.ru", + "youtube.sa", + "youtube.se", + "youtube.sg", + "youtube.si", + "youtube.sk", + "youtube.sn", + "youtube.tn", + "youtube.ua", + "youtube.ug", + "youtube.uy", + "youtube.vn", + "youtubeeducation.com", + "youtubemobilesupport.com", + "ytimg.com", + "accounts.google.com", + "apis.google.com", + "app.google.stackdriver.com", + "b.mail.google.com", + "chatenabled.mail.google.com", + "ddm.google.com", + "gmail.google.com", + "mail-attachment.googleusercontent.com", + "www.gmail.com", + "ad.doubleclick.net", + "redirector.googlevideo.com", + "beacons.gcp.gvt2.com", + "beacons.gvt2.com", + "beacons2.gvt2.com", + "beacons3.gvt2.com", + "beacons4.gvt2.com", + "beacons5.gvt2.com", + "beacons5.gvt3.com", + "clients2.google.com", + "crashdump.spotify.com" + //"cache.spotify.com" }; #endif /* _HOSTS_H */ diff --git a/src/stdafx.h b/src/stdafx.h index 4d258c7..0b93ed7 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -8,19 +8,12 @@ #include "targetver.h" #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: -#include +#include // TODO: reference additional headers your program requires here -#include -#include -#include -#include -#include +#include #include #include "HookApi.h" #include "hosts.h" -#pragma comment(lib, "Psapi.lib") -#pragma comment(lib, "ws2_32.lib") -#pragma comment(lib, "Winhttp.lib")