Skip to content

Commit

Permalink
Fix ad blocking
Browse files Browse the repository at this point in the history
fixes #516
  • Loading branch information
Nuzair46 authored Feb 14, 2024
1 parent 436df88 commit 7c96fbf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Modify.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "pch.h"
#include "pch.h"

/*
*
Expand Down Expand Up @@ -126,9 +126,9 @@ int cef_zip_reader_read_file_hook(void* self, void* buffer, size_t bufferSize)
#endif

if (file_name == L"home-hpto.css") {
const auto hpto = PatternScanner::ScanFirst(reinterpret_cast<std::size_t>(buffer), bufferSize, L".WiPggcPDzbwGxoxwLWFf{-webkit-box-pack:center;-ms-flex-pack:center;display:-webkit-box;display:-ms-flexbox;display:flex;");
const auto hpto = PatternScanner::ScanFirst(reinterpret_cast<std::size_t>(buffer), bufferSize, L".WiPggcPDzbwGxoxwLWFf{display:-webkit-box;display:-ms-flexbox;display:flex;");
if (hpto.is_found()) {
if (hpto.write<const char*>(".WiPggcPDzbwGxoxwLWFf{-webkit-box-pack:center;-ms-flex-pack:center;display:-webkit-box;display:-ms-flexbox;display:none;")) {
if (hpto.write<const char*>(".WiPggcPDzbwGxoxwLWFf{display:-webkit-box;display:-ms-flexbox;display:none;")) {
Logger::Log(L"hptocss patched!", Logger::LogLevel::Info);
}
else {
Expand Down Expand Up @@ -237,10 +237,10 @@ int cef_zip_reader_read_file_hook(void* self, void* buffer, size_t bufferSize)
Logger::Log(L"sp://ads/v1/ads/ - failed not found!", Logger::LogLevel::Error);
}

const auto premium_free = PatternScanner::ScanFirst(reinterpret_cast<std::size_t>(buffer), bufferSize, L"\"free\"===e.session?.productState?.catalogue?.toLowerCase(),r=e=>\"premium\"===e.session?.productState?.catalogue?.toLowerCase()");
const auto premium_free = PatternScanner::ScanFirst(reinterpret_cast<std::size_t>(buffer), bufferSize, L"e.session?.productState?.catalogue?.toLowerCase()");
if (premium_free.is_found()) {
//Print(L"{}", premium_free.read<const char*>());
if (premium_free.write<const char*>("\"premium\"===e.session?.productState?.catalogue?.toLowerCase(),r=e=>\"free\"===e.session?.productState?.catalogue?.toLowerCase()")) {
if (premium_free.write<const char*>("\"blockthespot-team-says-meow-meow-meow-meow-meow\"")) {
Logger::Log(L"premium patched!", Logger::LogLevel::Info);
}
else {
Expand Down

0 comments on commit 7c96fbf

Please sign in to comment.