From f892548d62b6b7fc758efd195bcafd95b7b7ebc9 Mon Sep 17 00:00:00 2001 From: letssync Date: Fri, 31 Jul 2020 01:17:26 +0200 Subject: [PATCH] Upload files to 'addons/urejectCR' --- addons/urejectCR/bg.js | 34 ++++++++++++++++++++++++++++++++++ addons/urejectCR/log.html | 20 ++++++++++++++++++++ addons/urejectCR/log.js | 18 ++++++++++++++++++ addons/urejectCR/manifest.json | 31 +++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 addons/urejectCR/bg.js create mode 100644 addons/urejectCR/log.html create mode 100644 addons/urejectCR/log.js create mode 100644 addons/urejectCR/manifest.json diff --git a/addons/urejectCR/bg.js b/addons/urejectCR/bg.js new file mode 100644 index 000000000..ba904ca74 --- /dev/null +++ b/addons/urejectCR/bg.js @@ -0,0 +1,34 @@ +let history = {}; +chrome.webRequest.onResponseStarted.addListener(i => { + if ([403, 406, 410, 429, 451, 462].includes(i.statusCode)) { + let iFQDN = (new URL(i.url)).hostname; + if (['searxes.eu.org', 'ansero.eu.org', 'ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion', 'searxes.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion', 'ansero.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion'].includes(iFQDN)) { + return; + } + let iServer = '?'; + i.responseHeaders.forEach(x => { + if (x.name == 'Server' || x.name == 'server') { + iServer = x.value; + } + }); + history[iFQDN] = [i.url, iServer, i.statusCode, (new Date()).toUTCString()]; + } + 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); + } + } +}); +chrome.browserAction.onClicked.addListener(() => { + chrome.runtime.openOptionsPage(); +}); \ No newline at end of file diff --git a/addons/urejectCR/log.html b/addons/urejectCR/log.html new file mode 100644 index 000000000..bcbc89c81 --- /dev/null +++ b/addons/urejectCR/log.html @@ -0,0 +1,20 @@ + + + + + 📝 + + +

+ Detaloj
+ + +
+
+
+

+ Nur FQDN
+ + + + \ No newline at end of file diff --git a/addons/urejectCR/log.js b/addons/urejectCR/log.js new file mode 100644 index 000000000..5117e5de5 --- /dev/null +++ b/addons/urejectCR/log.js @@ -0,0 +1,18 @@ +function newrow(w) { + let tt = document.getElementsByTagName('tbody')[0]; + let tr = tt.insertRow(tt.rows.length); + tr.innerHTML = w; +} +newrow('FQDNServiloStatoKieKiam'); +chrome.runtime.sendMessage('get', g => { + for (let k in g) { + newrow('' + k + '' + g[k][1] + '' + g[k][2] + ' 🔗 ' + g[k][3] + ''); + document.getElementById('export').innerHTML += k + "\n"; + } +}); +document.body.style.display = 'block'; +document.getElementById('clear').addEventListener('click', () => { + chrome.runtime.sendMessage('clear', () => { + location.reload(true); + }); +}); \ No newline at end of file diff --git a/addons/urejectCR/manifest.json b/addons/urejectCR/manifest.json new file mode 100644 index 000000000..7f361cbe0 --- /dev/null +++ b/addons/urejectCR/manifest.json @@ -0,0 +1,31 @@ +{ + "manifest_version": 2, + "name": "Kiu retejo malakceptis min?", + "version": "1.0.2", + "minimum_chrome_version": "60", + "homepage_url": "https://ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/", + "author": "Ss", + "incognito": "split", + "permissions": [ + "webRequest", + "" + ], + "icons": { + "72": "icons/72.png" + }, + "background": { + "scripts": [ + "bg.js" + ] + }, + "options_ui": { + "open_in_tab": true, + "chrome_style": false, + "page": "log.html" + }, + "browser_action": { + "default_icon": { + "72": "icons/72.png" + } + } +} \ No newline at end of file