From 495fdbe73efc1fb59efc76079566d60befd6918f Mon Sep 17 00:00:00 2001 From: letssync Date: Fri, 31 Jul 2020 01:17:43 +0200 Subject: [PATCH] Upload files to 'addons/urejectFX' --- addons/urejectFX/bg.js | 34 ++++++++++++++++++++++++++++++ addons/urejectFX/log.html | 20 ++++++++++++++++++ addons/urejectFX/log.js | 18 ++++++++++++++++ addons/urejectFX/manifest.json | 38 ++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 addons/urejectFX/bg.js create mode 100644 addons/urejectFX/log.html create mode 100644 addons/urejectFX/log.js create mode 100644 addons/urejectFX/manifest.json diff --git a/addons/urejectFX/bg.js b/addons/urejectFX/bg.js new file mode 100644 index 00000000..910ac7ec --- /dev/null +++ b/addons/urejectFX/bg.js @@ -0,0 +1,34 @@ +let history = {}; +browser.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']); +browser.runtime.onMessage.addListener((request, sender, sendResponse) => { + if (request && sender) { + if (request == 'get') { + sendResponse(history); + } + if (request == 'clear') { + history = {}; + sendResponse(true); + } + } +}); +browser.browserAction.onClicked.addListener(() => { + browser.runtime.openOptionsPage(); +}); \ No newline at end of file diff --git a/addons/urejectFX/log.html b/addons/urejectFX/log.html new file mode 100644 index 00000000..bcbc89c8 --- /dev/null +++ b/addons/urejectFX/log.html @@ -0,0 +1,20 @@ + + + + + 📝 + + +

+ Detaloj
+ + +
+
+
+

+ Nur FQDN
+ + + + \ No newline at end of file diff --git a/addons/urejectFX/log.js b/addons/urejectFX/log.js new file mode 100644 index 00000000..3ea31c60 --- /dev/null +++ b/addons/urejectFX/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'); +browser.runtime.sendMessage('get').then(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', () => { + browser.runtime.sendMessage('clear').then(() => { + location.reload(true); + }); +}); \ No newline at end of file diff --git a/addons/urejectFX/manifest.json b/addons/urejectFX/manifest.json new file mode 100644 index 00000000..256d65b8 --- /dev/null +++ b/addons/urejectFX/manifest.json @@ -0,0 +1,38 @@ +{ + "manifest_version": 2, + "name": "Kiu retejo malakceptis min?", + "description": "Via retejo malakceptis min, sed mi scias ke mi fartos bone.", + "version": "1.0.2", + "homepage_url": "https://ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/", + "author": "Ss", + "permissions": [ + "webRequest", + "" + ], + "icons": { + "72": "icons/72.png" + }, + "background": { + "scripts": [ + "bg.js" + ] + }, + "options_ui": { + "browser_style": false, + "open_in_tab": true, + "page": "log.html" + }, + "browser_action": { + "browser_style": true, + "default_icon": { + "72": "icons/72.png" + } + }, + "applications": { + "gecko": { + "id": "urejectme@searxes.eu.org", + "strict_min_version": "60.0", + "update_url": "https://api.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/_/addon.php?for=ureject" + } + } +} \ No newline at end of file