Skip to content

Instantly share code, notes, and snippets.

@manciuszz
Last active March 9, 2020 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manciuszz/4ae2499f0b748be2ef83a98b41e50843 to your computer and use it in GitHub Desktop.
Save manciuszz/4ae2499f0b748be2ef83a98b41e50843 to your computer and use it in GitHub Desktop.
KissManga Cloudflare Challenge Anti-AdBlock Counter-Tamper.
// ==UserScript==
// @name KissManga - AdBlock Tampered Cloudflare Challenge Bypass
// @version 0.11
// @author Manciuszz
// @match *://kissmanga.com/*
// @grant unsafeWindow
// ==/UserScript==
(function() {
'use strict';
let footprint = document.querySelector("div[id^='cf-dn']");
if (footprint) {
document.cookie.split(";").forEach(function(c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });
unsafeWindow.t = window.location.host;
unsafeWindow.k = footprint.id;
}
})();
@tjd46
Copy link

tjd46 commented Mar 9, 2020

is there an easy way to get this to work with other sites that are using cloudflare?

@manciuszz
Copy link
Author

is there an easy way to get this to work with other sites that are using cloudflare?

It really depends on the website and their cloudflare implementation. If the tampering done was identical to this, then simply adding a new line like this

// @match ://my_tampered_website.com/

will solve the issue... but that's highly unlikely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment