From 4daec001868ebb056ff141c2f00a8f49adc8154a Mon Sep 17 00:00:00 2001 From: cloudflaredns Date: Mon, 20 May 2019 14:41:38 +0000 Subject: Upload files to 'addon_chrome/whyrejectme' --- addon_chrome/whyrejectme/bg.js | 34 ++++++++++++++++++++++++++++++++++ addon_chrome/whyrejectme/log.html | 17 +++++++++++++++++ addon_chrome/whyrejectme/log.js | 22 ++++++++++++++++++++++ addon_chrome/whyrejectme/manifest.json | 25 +++++++++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 addon_chrome/whyrejectme/bg.js create mode 100644 addon_chrome/whyrejectme/log.html create mode 100644 addon_chrome/whyrejectme/log.js create mode 100644 addon_chrome/whyrejectme/manifest.json (limited to 'addon_chrome') diff --git a/addon_chrome/whyrejectme/bg.js b/addon_chrome/whyrejectme/bg.js new file mode 100644 index 00000000..13b5464d --- /dev/null +++ b/addon_chrome/whyrejectme/bg.js @@ -0,0 +1,34 @@ +let history = {}; + +chrome.webRequest.onResponseStarted.addListener(i => { + if ([403, 406, 410, 451, 462].includes(i.statusCode)) { + let iFQDN = (new URL(i.url)).hostname; + if (iFQDN == 'searxes.eu.org' || iFQDN == 'AAAsearxes.nmqnkngye4ct7bgss4bmv5ca3wpa55yugvxen5kz2bbq67lwy6ps54yd.onion') { + return; + } + let iServer = 'Unknown'; + i.responseHeaders.forEach(x => { + if (x.name == 'Server') { + iServer = x.value; + } + }); + let iDate = (new Date()).toUTCString(); + history[iFQDN] = [i.url, iServer, i.statusCode, iDate]; + } + return; +}, { + urls: ['http://*/*', 'https://*/*'], + types: ['main_frame'] +}, ['responseHeaders']); + +chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { + if (request && sender) { + if (request == 'get') { + sendResponse(history); + } + if (request == 'clear') { + history = {}; + sendResponse(true); + } + } +}); \ No newline at end of file diff --git a/addon_chrome/whyrejectme/log.html b/addon_chrome/whyrejectme/log.html new file mode 100644 index 00000000..611fb9c8 --- /dev/null +++ b/addon_chrome/whyrejectme/log.html @@ -0,0 +1,17 @@ + + + Log + + + + +
+
+ ↑ Details
+  → Action:
+ ↓ FQDN only
+
+ + + + \ No newline at end of file diff --git a/addon_chrome/whyrejectme/log.js b/addon_chrome/whyrejectme/log.js new file mode 100644 index 00000000..369a76eb --- /dev/null +++ b/addon_chrome/whyrejectme/log.js @@ -0,0 +1,22 @@ +function newrow(w) { + let tt = document.getElementsByTagName('tbody')[0]; + let tr = tt.insertRow(tt.rows.length); + tr.innerHTML = w; +} + +newrow('FQDNServerCodeWhereWhen'); + +chrome.runtime.sendMessage('get', function (g) { + for (let k in g) { + newrow('' + k + '' + g[k][1] + '' + g[k][2] + 'Link' + g[k][3] + ''); + document.getElementById('export').innerHTML += k + "\n"; + } +}); + +document.body.style.display = 'block'; + +document.getElementById('clear').addEventListener('click', () => { + chrome.runtime.sendMessage('clear', function () { + location.reload(true); + }); +}); \ No newline at end of file diff --git a/addon_chrome/whyrejectme/manifest.json b/addon_chrome/whyrejectme/manifest.json new file mode 100644 index 00000000..8623d702 --- /dev/null +++ b/addon_chrome/whyrejectme/manifest.json @@ -0,0 +1,25 @@ +{ + "manifest_version": 2, + "name": "Which website rejected me?", + "version": "1.0.2", + "minimum_chrome_version": "60", + "homepage_url": "https://notabug.org/crimeflare/cloudflare-tor", + "author": "Daniel J. Schreiber", + "incognito": "split", + "permissions": [ + "webRequest", + "" + ], + "icons": { + "32": "icons/32.png" + }, + "background": { + "scripts": [ + "bg.js" + ] + }, + "options_ui": { + "open_in_tab": true, + "page": "log.html" + } +} \ No newline at end of file -- cgit v1.2.3