Upload files to 'addons/code/bcma'

This commit is contained in:
mally 2021-09-13 04:57:58 +00:00
parent f61c6a7c18
commit 2163a27b4b
4 changed files with 68 additions and 75 deletions

View File

@ -12,14 +12,6 @@ let my_cf_collection = [],
my_xcs_a1 = false, my_xcs_a1 = false,
my_xcs_a2 = false, my_xcs_a2 = false,
my_nfo_lang = 'eo'; my_nfo_lang = 'eo';
const trans = {
'eo': {
'detemi': 'Minaco Detektita',
'cflrmi': 'Cloudflare Detektita',
'virus': "Atentivelo: Severa\nAgo: Blokita\nDomajno: ",
'redir': "Redirektu al alternativa URL.\n\nDomajno: "
}
};
function get_realdomain(w) { function get_realdomain(w) {
let wa = w.split('.'); let wa = w.split('.');
let wa_l = wa.length; let wa_l = wa.length;
@ -1105,14 +1097,14 @@ function update_icon(tid, url) {
}); });
return; return;
} }
function tell_me(ok, mgT, mgD) { function notify_me(ok, hn) {
if (ok) { if (ok) {
browser.notifications.clear(infobox); browser.notifications.clear(infobox);
browser.notifications.create(infobox, { browser.notifications.create(infobox, {
'type': 'basic', 'type': 'basic',
'iconUrl': browser.runtime.getURL('icons/cf_1.png'), 'iconUrl': browser.runtime.getURL('icons/cf_1.png'),
'title': mgT + ' [' + ((new Date()).toLocaleString()) + ']', 'title': 'Cloudflare! [' + ((new Date()).toLocaleString()) + ']',
'message': mgD 'message': hn
}); });
} }
} }
@ -1178,7 +1170,7 @@ browser.webRequest.onHeadersReceived.addListener(function (wr) {
} }
console.log('BCMA: Block Cloudflare RH', wr_hostname); console.log('BCMA: Block Cloudflare RH', wr_hostname);
if (my_action == 0 || my_action == 1) { if (my_action == 0 || my_action == 1) {
tell_me(my_nfo_cfd, trans['eo']['detemi'], trans['eo']['virus'] + wr_hostname); notify_me(my_nfo_cfd, wr_hostname);
if (wr.type == 'image') { if (wr.type == 'image') {
return { return {
redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs=' redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs='
@ -1190,13 +1182,13 @@ browser.webRequest.onHeadersReceived.addListener(function (wr) {
} }
} }
if (my_action == 2) { if (my_action == 2) {
tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); notify_me(my_nfo_alu, wr_hostname);
return { return {
redirectUrl: 'https://web.archive.org/web/' + wr.url redirectUrl: 'https://web.archive.org/web/' + wr.url
}; };
} }
if (my_action == 4) { if (my_action == 4) {
tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); notify_me(my_nfo_alu, wr_hostname);
return { return {
redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url)) redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url))
}; };
@ -1239,7 +1231,7 @@ browser.webRequest.onBeforeRequest.addListener(function (wr) {
if (cf_is) { if (cf_is) {
console.log('BCMA: Block Cloudflare BR', wr_hostname); console.log('BCMA: Block Cloudflare BR', wr_hostname);
if (my_action == 0 || my_action == 1) { if (my_action == 0 || my_action == 1) {
tell_me(my_nfo_cfd, trans['eo']['detemi'], trans['eo']['virus'] + wr_hostname); notify_me(my_nfo_cfd, wr_hostname);
if (wr.type == 'image') { if (wr.type == 'image') {
return { return {
redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs=' redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs='
@ -1251,13 +1243,13 @@ browser.webRequest.onBeforeRequest.addListener(function (wr) {
} }
} }
if (my_action == 2) { if (my_action == 2) {
tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); notify_me(my_nfo_alu, wr_hostname);
return { return {
redirectUrl: 'https://web.archive.org/web/' + wr.url redirectUrl: 'https://web.archive.org/web/' + wr.url
}; };
} }
if (my_action == 4) { if (my_action == 4) {
tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); notify_me(my_nfo_alu, wr_hostname);
return { return {
redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url)) redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url))
}; };

View File

@ -20,7 +20,7 @@
<input type="text" id="vau" spellcheck="false" value="" placeholder="ekz. https://mia.ekzemplo.net/proxy?url=%%URL%%"> <input type="text" id="vau" spellcheck="false" value="" placeholder="ekz. https://mia.ekzemplo.net/proxy?url=%%URL%%">
<button type="button" id="aus"> <span transk="apply"></span> </button> <button type="button" id="aus"> <span transk="apply"></span> </button>
&nbsp;<br>&nbsp;<br> &nbsp;<br>&nbsp;<br>
<b>&#128276; <span transk="notify"></span> (Esperanto)</b><br> <b>&#128276; <span transk="notify"></span></b><br>
<label><input type="checkbox" id="nnf1"> <span transk="notif1"></span></label><br> <label><input type="checkbox" id="nnf1"> <span transk="notif1"></span></label><br>
<label><input type="checkbox" id="nnf2"> <span transk="notif2"></span></label> <label><input type="checkbox" id="nnf2"> <span transk="notif2"></span></label>
&nbsp;<br>&nbsp;<br> &nbsp;<br>&nbsp;<br>
@ -144,14 +144,15 @@
<option value="xh">xh | isiXhosa</option> <option value="xh">xh | isiXhosa</option>
<option value="yi">yi | אידיש</option> <option value="yi">yi | אידיש</option>
<option value="yo">yo | Èdè Yorùbá</option> <option value="yo">yo | Èdè Yorùbá</option>
<option value="zh">zh | 汉语</option> <option value="zh">zh | 简体</option>
<option value="zt">zt | 漢語</option> <option value="zt">zt | 繁體</option>
<option value="zu">zu | isiZulu</option> <option value="zu">zu | isiZulu</option>
</select> </select>
&nbsp;<br>&nbsp;<br> &nbsp;<br>&nbsp;<br>
<b>&#128218; <span transk="useflik"></span></b><br> <b>&#128218; <span transk="useflik"></span></b><br>
<ul> <ul>
<li><a id="toolim" target="_blank"><span transk="tsmitm"></span></a></li> <li><a id="toolim" target="_blank"><span transk="tsmitm"></span></a></li>
<li><a href="http://altlink.crimeflare.eu.org/" target="_blank">🙅🌩🔗</a></li>
</ul> </ul>
&nbsp;<br> &nbsp;<br>
<script src="cg.js"></script> <script src="cg.js"></script>

View File

@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', () => {
x.innerText = j[x.getAttribute('transk')]; x.innerText = j[x.getAttribute('transk')];
}); });
}); });
document.getElementById('toolim').href = 'https://sercxi.nnpaefp7pkadbxxkhz2agtbv2a4g5sgo2fbmv3i7czaua354334uqqad.onion/ss/tool_qdb.php?ul=' + r[5]; document.getElementById('toolim').href = 'https://sercxi.eu.org/ss/tool_qdb.php?ul=' + r[5];
document.getElementById('t').value = JSON.parse(r[0]).join("\n"); document.getElementById('t').value = JSON.parse(r[0]).join("\n");
document.getElementById('g').value = JSON.parse(r[1]).join("\n"); document.getElementById('g').value = JSON.parse(r[1]).join("\n");
document.getElementById('vau').value = r[3]; document.getElementById('vau').value = r[3];

View File

@ -1,56 +1,56 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "Bloku Cloudflaron MITM-Atakon", "name": "Bloku Cloudflaron MITM-Atakon",
"description": "Submetiĝu al tutmonda gvatado aŭ rezistu", "description": "Submeti\u011du al tutmonda gvatado a\u016d rezistu",
"version": "1.0.6", "version": "1.0.7",
"homepage_url": "http://crimeflare.eu.org/", "homepage_url": "http://crimeflare.eu.org/",
"author": "Crimeflare #Addon", "author": "Crimeflare",
"permissions": [ "permissions": [
"<all_urls>", "<all_urls>",
"activeTab", "activeTab",
"tabs", "tabs",
"webRequest", "webRequest",
"webRequestBlocking", "webRequestBlocking",
"webNavigation", "webNavigation",
"notifications", "notifications",
"storage", "storage",
"unlimitedStorage" "unlimitedStorage"
], ],
"icons": { "icons": {
"72": "icons/72.png" "72": "icons/72.png"
}, },
"background": { "background": {
"scripts": [ "scripts": [
"cf.js" "cf.js"
] ]
}, },
"content_scripts": [ "content_scripts": [
{ {
"matches": [ "matches": [
"http://*/*", "http://*/*",
"https://*/*" "https://*/*"
], ],
"js": [ "js": [
"cs.js" "cs.js"
], ],
"run_at": "document_end" "run_at": "document_end"
} }
], ],
"options_ui": { "options_ui": {
"browser_style": true, "browser_style": true,
"page": "cg.html" "page": "cg.html"
}, },
"browser_action": { "browser_action": {
"browser_style": true, "browser_style": true,
"default_icon": { "default_icon": {
"32": "icons/cf_0.png" "32": "icons/cf_0.png"
} }
}, },
"applications": { "applications": {
"gecko": { "gecko": {
"id": "bcma@searxes.eu.org", "id": "bcma@searxes.eu.org",
"strict_min_version": "78.0", "strict_min_version": "78.0",
"update_url": "https://api.nnpaefp7pkadbxxkhz2agtbv2a4g5sgo2fbmv3i7czaua354334uqqad.onion/_/addon.php?for=bcma" "update_url": "https://api.sercxi.eu.org/_/addon.php?for=bcma"
} }
} }
} }