Skip to content

Commit 8db7392

Browse files
committed
1.1.71.560.gc21c3367
1 parent 6694a62 commit 8db7392

File tree

5 files changed

+97
-24
lines changed

5 files changed

+97
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<h4 align="center">A multi-purpose adblocker and skip-bypass for the <strong>Windows</strong> Spotify desktop application.</h4>
1212
<h5 align="center">Please support Spotify by purchasing premium</h5>
1313
<p align="center">
14-
<strong>Last updated:</strong> 2 October 2021<br>
15-
<strong>Last tested version:</strong> 1.1.70.610.g4585142b
14+
<strong>Last updated:</strong> 29 October 2021<br>
15+
<strong>Last tested version:</strong> 1.1.71.560.gc21c3367
1616
</p>
1717
</center>
1818

src/BlockTheSpot.cpp

Lines changed: 93 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,82 @@
33

44
#include "stdafx.h"
55

6-
bool AddDllToBlacklist (const wchar_t* dll_name) { return true; }
6+
void __stdcall LoadAPI (LPVOID* destination, LPCSTR apiName)
7+
{
8+
if (*destination)
9+
return;
10+
11+
char path[MAX_PATH];
12+
//wchar_t windows[MAX_PATH];
13+
//GetSystemDirectoryW(windows, MAX_PATH);
14+
//wsprintf(path, L"%s\\netutils.dll", windows);
15+
wsprintf (path, ".\\chrome_elf.dll.bak");
16+
HMODULE hModule = GetModuleHandle (path);
17+
if (!hModule && !(hModule = LoadLibrary (path)))
18+
return;
19+
*destination = GetProcAddress (hModule, apiName);
20+
}
21+
22+
#define API_EXPORT_ORIG(N) \
23+
static LPVOID _##N = NULL; \
24+
char S_##N[] = "" # N; \
25+
extern "C" __declspec(dllexport) __declspec(naked) void N ## () \
26+
{ \
27+
__asm pushad \
28+
__asm push offset S_##N \
29+
__asm push offset _##N \
30+
__asm call LoadAPI \
31+
__asm popad \
32+
__asm jmp [_##N] \
33+
} \
34+
35+
36+
API_EXPORT_ORIG (ClearReportsBetween_ExportThunk)
37+
API_EXPORT_ORIG (CrashForException_ExportThunk)
38+
API_EXPORT_ORIG (DisableHook)
39+
API_EXPORT_ORIG (DrainLog)
40+
API_EXPORT_ORIG (DumpHungProcessWithPtype_ExportThunk)
41+
API_EXPORT_ORIG (DumpProcessWithoutCrash)
42+
API_EXPORT_ORIG (GetApplyHookResult)
43+
API_EXPORT_ORIG (GetBlockedModulesCount)
44+
API_EXPORT_ORIG (GetCrashReports_ExportThunk)
45+
API_EXPORT_ORIG (GetCrashpadDatabasePath_ExportThunk)
46+
API_EXPORT_ORIG (GetHandleVerifier)
47+
API_EXPORT_ORIG (GetInstallDetailsPayload)
48+
API_EXPORT_ORIG (GetUniqueBlockedModulesCount)
49+
API_EXPORT_ORIG (GetUserDataDirectoryThunk)
50+
API_EXPORT_ORIG (InjectDumpForHungInput_ExportThunk)
51+
API_EXPORT_ORIG (IsBrowserProcess)
52+
API_EXPORT_ORIG (IsCrashReportingEnabledImpl)
53+
API_EXPORT_ORIG (IsThirdPartyInitialized)
54+
API_EXPORT_ORIG (RegisterLogNotification)
55+
API_EXPORT_ORIG (RequestSingleCrashUpload_ExportThunk)
56+
API_EXPORT_ORIG (SetCrashKeyValueImpl)
57+
API_EXPORT_ORIG (SetMetricsClientId)
58+
API_EXPORT_ORIG (SetUploadConsent_ExportThunk)
59+
API_EXPORT_ORIG (SignalChromeElf)
60+
API_EXPORT_ORIG (SignalInitializeCrashReporting)
61+
62+
#define API_COPY(M, N) \
63+
_##N = GetProcAddress(M, #N);
64+
65+
66+
/*
67+
//bool AddDllToBlacklist (const wchar_t* dll_name) { return true; }
768
void ClearReportsBetween_ExportThunk (time_t begin, time_t end) {}
869
970
int CrashForException_ExportThunk (EXCEPTION_POINTERS* info) {
10-
return EXCEPTION_CONTINUE_SEARCH;
71+
return UnhandledExceptionFilter (info);
1172
}
73+
74+
1275
void DisableHook () {}
1376
14-
UINT32 DrainLog (UINT8* buffer,
15-
UINT32 buffer_size,
16-
UINT32* log_remaining) {
77+
uint32_t DrainLog (uint8_t* buffer,
78+
uint32_t buffer_size,
79+
uint32_t* log_remaining) {
80+
return 0;
1781
18-
return 0;
1982
}
2083
2184
bool DumpHungProcessWithPtype_ExportThunk (HANDLE process_handle,
@@ -25,8 +88,9 @@ bool DumpHungProcessWithPtype_ExportThunk (HANDLE process_handle,
2588
2689
void DumpProcessWithoutCrash (void* task_port) {}
2790
28-
INT32 GetApplyHookResult () { return 0; }
29-
UINT32 GetBlockedModulesCount () { return 0; }
91+
int32_t GetApplyHookResult () { return 0; }
92+
93+
uint32_t GetBlockedModulesCount () { return 0; }
3094
3195
size_t GetCrashReports_ExportThunk (void* reports,
3296
size_t reports_size) {
@@ -36,36 +100,49 @@ size_t GetCrashReports_ExportThunk (void* reports,
36100
const wchar_t* GetCrashpadDatabasePath_ExportThunk () {
37101
return nullptr;
38102
}
39-
void* GetHandleVerifier () {
103+
104+
void* GetHandleVerifier () { return NULL; };
105+
106+
const void* GetInstallDetailsPayload () {
40107
return nullptr;
41108
}
42-
UINT32 GetInstallDetailsPayload () { return 0; }
43-
UINT32 GetUniqueBlockedModulesCount () { return 0; }
109+
110+
uint32_t GetUniqueBlockedModulesCount () {
111+
return 0;
112+
}
113+
44114
bool GetUserDataDirectoryThunk (wchar_t* user_data_dir,
45115
size_t user_data_dir_length,
46116
wchar_t* invalid_user_data_dir,
47117
size_t invalid_user_data_dir_length) {
48118
return true;
49119
}
120+
50121
HANDLE InjectDumpForHungInput_ExportThunk (HANDLE process) {
51122
return nullptr;
52123
}
53-
bool IsBlacklistInitialized () {
54-
return false;
124+
125+
bool IsBrowserProcess () {
126+
return true;
55127
}
56-
bool IsCrashReportingEnabledImpl () {
128+
129+
bool IsCrashReportingEnabledImpl (const void* local_state) {
57130
return false;
58131
}
59132
bool IsThirdPartyInitialized () {
60133
return false;
61134
}
135+
62136
bool RegisterLogNotification (HANDLE event_handle) {
63137
return false;
64138
}
65139
void RequestSingleCrashUpload_ExportThunk (const char* local_id) {}
66-
void SetCrashKeyValueImpl () {}
140+
void SetCrashKeyValueImpl (const char*, const char*) {}
67141
void SetMetricsClientId (const char* client_id) {}
142+
68143
void SetUploadConsent_ExportThunk (bool consent) {}
69144
void SignalChromeElf () {}
70145
void SignalInitializeCrashReporting () {}
71-
void SuccessfullyBlocked (const wchar_t** blocked_dlls, int* size) {}
146+
//void SuccessfullyBlocked (const wchar_t** blocked_dlls, int* size) {}
147+
148+
*/

src/BlockTheSpot.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
</ItemGroup>
122122
<ItemGroup>
123123
<None Include="..\README.md" />
124-
<None Include="chrome_elf.def" />
125124
</ItemGroup>
126125
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
127126
<ImportGroup Label="ExtensionTargets" />

src/BlockTheSpot.vcxproj.filters

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<ClInclude Include="Logger.h" />
1414
</ItemGroup>
1515
<ItemGroup>
16-
<None Include="chrome_elf.def" />
1716
<None Include="..\README.md" />
1817
</ItemGroup>
1918
</Project>

src/chrome_elf.def

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
LIBRARY "chrome_elf"
22

33
EXPORTS
4-
AddDllToBlacklist
54
ClearReportsBetween_ExportThunk
65
CrashForException_ExportThunk
76
DisableHook
@@ -17,7 +16,7 @@ GetInstallDetailsPayload
1716
GetUniqueBlockedModulesCount
1817
GetUserDataDirectoryThunk
1918
InjectDumpForHungInput_ExportThunk
20-
IsBlacklistInitialized
19+
IsBrowserProcess
2120
IsCrashReportingEnabledImpl
2221
IsThirdPartyInitialized
2322
RegisterLogNotification
@@ -26,5 +25,4 @@ SetCrashKeyValueImpl
2625
SetMetricsClientId
2726
SetUploadConsent_ExportThunk
2827
SignalChromeElf
29-
SignalInitializeCrashReporting
30-
SuccessfullyBlocked
28+
SignalInitializeCrashReporting

0 commit comments

Comments
 (0)