From df64c37c2409a35e40178004f616e8fd1339bc7c Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 4 Oct 2020 19:08:36 +0200 Subject: [PATCH] Fix-update The Hindu (fake geo) Blocked by EasyPrivacy-list --- contentScript.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/contentScript.js b/contentScript.js index 1dbefb2..168b24a 100644 --- a/contentScript.js +++ b/contentScript.js @@ -269,6 +269,9 @@ else if (matchDomain('ft.com')) { } else if (matchDomain("thehindu.com")) { + if (!localStorage.geo) { + localStorage.setItem("geo", '{"v":{"clientTcpRtt":20,"longitude":"'+ makeRandomNumber(2) + '.' + makeRandomNumber(5) + '","httpProtocol":"HTTP/2","tlsCipher":"AEAD-AES128-GCM-SHA256","continent":"EU","asn":1234,"clientAcceptEncoding":"gzip, deflate,br","country":"UK","isEUCountry":"1","tlsClientAuth":{"certIssuerDNLegacy":"","certIssuerDN":"","certIssuerDNRFC2253":"","certSubjectDNLegacy":"","certVerified":"NONE","certNotAfter":"","certSubjectDN":"","certFingerprintSHA1":"","certNotBefore":"","certSerial":"","certPresented":"0","certSubjectDNRFC2253":""},"tlsVersion":"TLSv1.3","colo":"DUS","timezone":"Europe/London","edgeRequestKeepAliveStatus":1,"requestPriority":"weight=220;exclusive=1","botManagement":{"staticResource":false,"verifiedBot":false,"score":99},"clientTrustScore":99,"postalCode":"' + makeRandomNumber(4) + '","regionCode":"QR","region":"County","city":"London","latitude":"' + makeRandomNumber(2) + '.' + makeRandomNumber(5) + '"},"e":' + makeRandomNumber(13) + '}'); + } let counter = document.querySelector('#test'); removeDOMElement(counter); function hindu_main() { @@ -1253,6 +1256,16 @@ function genHexString(len) { return output; } +function makeRandomNumber(len) { + let result = ''; + var characters = '123456789'; + var charactersLength = characters.length; + for (var i = 0; i < len; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} + function pageContains(selector, text) { let elements = document.querySelectorAll(selector); return Array.prototype.filter.call(elements, function(element){