Skip to content

Commit

Permalink
update new version
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpond committed Aug 17, 2021
1 parent 5d5d5a5 commit b1579cb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<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> 1 August 2021<br>
<strong>Last tested version:</strong> 1.1.65.643.g2d707698-a
<strong>Last updated:</strong> 17 August 2021<br>
<strong>Last tested version:</strong> 1.1.66.578.gc54d0f69-a
</p>
</center>

Expand Down
21 changes: 19 additions & 2 deletions src/Modify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using _cef_urlrequest_create = cef_urlrequest_t * (*)(struct _cef_request_t* req
static _cef_urlrequest_create cef_urlrequest_create_orig;
static constexpr std::array<std::string_view, 3> blockList = { "/ads/", "/ad-logic/", "/gabo-receiver-service/" };
static constexpr std::array<std::string_view, 3> block_list = { "/ads/", "/ad-logic/", "/gabo-receiver-service/" };
cef_urlrequest_t* cef_urlrequest_create_hook (struct _cef_request_t* request,
struct _cef_urlrequest_client_t* client,
Expand All @@ -40,7 +40,7 @@ cef_urlrequest_t* cef_urlrequest_create_hook (struct _cef_request_t* request,
delete[] c_url;
cef_string_userfree_utf16_free (url_utf16);
for (auto blockurl : blockList) {
for (const auto& blockurl : block_list) {
if (std::string::npos != url.find (blockurl)) {
g_Logger.Log ("blocked - " + url);
return nullptr;
Expand Down Expand Up @@ -103,6 +103,23 @@ DWORD WINAPI KillBanner (LPVOID)
}
else {
g_Logger.Log ("main process - patch failed!");

skipPod = FindPattern ((uint8_t*)hModule, mInfo.SizeOfImage, (BYTE*)"\x83\xC4\x08\x84\xC0\x0F\x84\xED\x03\x00\x00", "xxxxxxxxxxx");
if (skipPod)
{
DWORD oldProtect;
VirtualProtect ((char*)skipPod + 5, 1, PAGE_EXECUTE_READWRITE, &oldProtect);
memset ((char*)skipPod + 5, 0x90, 1);
VirtualProtect ((char*)skipPod + 5, 1, oldProtect, &oldProtect);

VirtualProtect ((char*)skipPod + 6, 1, PAGE_EXECUTE_READWRITE, &oldProtect);
memset ((char*)skipPod + 6, 0xE9, 1);
VirtualProtect ((char*)skipPod + 6, 1, oldProtect, &oldProtect);
g_Logger.Log ("main process 1.1.66.578.gc54d0f69-a - patch success!");
}
else {
g_Logger.Log ("main process 1.1.66.578.gc54d0f69-a - patch failed!");
}
}

}
Expand Down

0 comments on commit b1579cb

Please sign in to comment.