Upload files to 'addons/bcmaFX'

This commit is contained in:
letssync 2020-07-31 01:11:12 +02:00
parent 8211cdcdce
commit df01e6c36c
4 changed files with 1697 additions and 0 deletions

1469
addons/bcmaFX/cf.js Normal file

File diff suppressed because one or more lines are too long

73
addons/bcmaFX/cg.html Normal file
View File

@ -0,0 +1,73 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
<body>
&nbsp;<br>
<b>&#128226; <span transk="actnow"></span></b><br>
<label><input type="radio" id="ta0" name="ta" value="0"> <span transk="actt0"></span></label><br>
<label><input type="radio" id="ta1" name="ta" value="1"> <span transk="actt1"></span></label><br>
<label><input type="radio" id="ta2" name="ta" value="2"> <span transk="actt2"></span></label><br>
<label><input type="radio" id="ta4" name="ta" value="4"> <span transk="actt4"></span></label><br>
<label><input type="radio" id="ta3" name="ta" value="3"> <span transk="actt3"></span></label>
&nbsp;<br>&nbsp;<br>
<b>&#128391; <span transk="uralturl"></span></b><br>
<span transk="ururepl"></span><br>
<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>
&nbsp;<br>&nbsp;<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="nnf2"> <span transk="notif2"></span></label>
&nbsp;<br>&nbsp;<br>
<b>&#128210; <span transk="urdomco"></span></b><br>
<textarea cols="50" rows="10" id="t" wrap="off" spellcheck="false" placeholder="Cloudflare domajnoj" readonly></textarea>
<br>
<button type="button" id="exp"> <span transk="export"></span> </button>
<button type="button" id="clr"> <span transk="clear"></span> </button>
&nbsp;<br>&nbsp;<br>
<b>&#127987; <span transk="urwhite"></span></b><br>
<textarea cols="50" rows="10" id="g" wrap="off" spellcheck="false" placeholder="ekzemplo.com"></textarea>
<br>
<button type="button" id="ign"> <span transk="apply"></span> </button>
&nbsp;<br>&nbsp;<br>
<b>&#128172; Internacio</b><br>
<select id="myul">
<option value="" selected> --- </option>
<option value="ar">العربية</option>
<option value="bn">বাংলা</option>
<option value="de">Deutsch</option>
<option value="eo">Esperanto &#127942;</option>
<option value="es">Español</option>
<option value="fa">فارسی</option>
<option value="fr">Français</option>
<option value="ha">Harshen</option>
<option value="hi">हिंदी</option>
<option value="id">Indonesia</option>
<option value="it">Italiano</option>
<option value="ja">日本語</option>
<option value="jv">ꦧꦱꦗꦮ</option>
<option value="ko">힌디어</option>
<option value="mr">मराठी</option>
<option value="ms">bahasa Melayu</option>
<option value="nl">Nederlands</option>
<option value="pt">Português</option>
<option value="ru">Русский</option>
<option value="sw">Kiswahili</option>
<option value="ta">தமிழ்</option>
<option value="th">ภาษาไทย</option>
<option value="tr">Türkçe</option>
<option value="ur">اردو</option>
<option value="vi">Tiếng Việt</option>
<option value="zh">中文</option>
</select>
&nbsp;<br>&nbsp;<br>
<b>&#128218; <span transk="useflik"></span></b><br>
<ul>
<li><a href="https://ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/ss/tool_ismitm.php" target="_blank"><span transk="tsmitm"></span></a></li>
<li><a href="https://codeberg.org/crimeflare/cloudflare-tor" target="_blank">"The Great Cloudwall"</a></li>
</ul>
&nbsp;<br>
<script src="cg.js"></script>
</body>
</html>

111
addons/bcmaFX/cg.js Normal file
View File

@ -0,0 +1,111 @@
document.addEventListener('DOMContentLoaded', () => {
browser.runtime.sendMessage(['cf']).then((r) => {
fetch('i18n/' + r[5] + '.json', {
method: 'GET'
}).then(j => j.json()).then(j => {
document.querySelectorAll('span[transk]').forEach(x => {
x.innerText = j[x.getAttribute('transk')];
});
});
document.getElementById('t').value = JSON.parse(r[0]).join("\n");
document.getElementById('g').value = JSON.parse(r[1]).join("\n");
document.getElementById('vau').value = r[3];
document.getElementById('nnf1').checked = r[4][0];
document.getElementById('nnf2').checked = r[4][1];
switch (r[2]) {
case 0:
document.getElementById('ta0').checked = true;
document.getElementById('ta1').checked = false;
document.getElementById('ta2').checked = false;
document.getElementById('ta3').checked = false;
document.getElementById('ta4').checked = false;
break;
case 1:
document.getElementById('ta0').checked = false;
document.getElementById('ta1').checked = true;
document.getElementById('ta2').checked = false;
document.getElementById('ta3').checked = false;
document.getElementById('ta4').checked = false;
break;
case 3:
document.getElementById('ta0').checked = false;
document.getElementById('ta1').checked = false;
document.getElementById('ta2').checked = false;
document.getElementById('ta3').checked = true;
document.getElementById('ta4').checked = false;
break;
case 4:
document.getElementById('ta0').checked = false;
document.getElementById('ta1').checked = false;
document.getElementById('ta2').checked = false;
document.getElementById('ta3').checked = false;
document.getElementById('ta4').checked = true;
break;
default:
document.getElementById('ta0').checked = false;
document.getElementById('ta1').checked = false;
document.getElementById('ta2').checked = true;
document.getElementById('ta3').checked = false;
document.getElementById('ta4').checked = false;
break;
}
});
document.getElementById('aus').addEventListener('click', function () {
browser.runtime.sendMessage(['au', document.getElementById('vau').value]);
});
document.getElementById('exp').addEventListener('click', () => {
browser.tabs.create({
active: true,
url: 'about:blank'
}).then(function (t) {
browser.tabs.executeScript(t.id, {
matchAboutBlank: true,
code: "document.documentElement.innerHTML='<html><body><pre>'+atob('" + btoa(document.getElementById('t').value) + "')+'</pre></body></html>';window.stop();"
});
});
});
document.getElementById('clr').addEventListener('click', () => {
browser.runtime.sendMessage(['dy']);
document.getElementById('t').value = '';
});
document.getElementById('nnf1').addEventListener('click', function () {
browser.runtime.sendMessage(['nnf', '1', (this.checked ? true : false)]);
});
document.getElementById('nnf2').addEventListener('click', function () {
browser.runtime.sendMessage(['nnf', '2', (this.checked ? true : false)]);
});
document.getElementById('ta0').addEventListener('click', function () {
if (this.checked) {
browser.runtime.sendMessage(['ta', '0']);
}
});
document.getElementById('ta1').addEventListener('click', function () {
if (this.checked) {
browser.runtime.sendMessage(['ta', '1']);
}
});
document.getElementById('ta2').addEventListener('click', function () {
if (this.checked) {
browser.runtime.sendMessage(['ta', '2']);
}
});
document.getElementById('ta3').addEventListener('click', function () {
if (this.checked) {
browser.runtime.sendMessage(['ta', '3']);
}
});
document.getElementById('ta4').addEventListener('click', function () {
if (this.checked) {
browser.runtime.sendMessage(['ta', '4']);
}
});
document.getElementById('ign').addEventListener('click', function () {
browser.runtime.sendMessage(['ig', document.getElementById('g').value.split("\n")]);
});
document.getElementById('myul').addEventListener('change', () => {
if (document.getElementById('myul').value != '') {
browser.runtime.sendMessage(['ul', document.getElementById('myul').value]);
location.reload(true);
}
});
});

View File

@ -0,0 +1,44 @@
{
"manifest_version": 2,
"name": "Bloku Cloudflaron MITM-Atakon",
"description": "Submetiĝu al tutmonda gvatado aŭ rezistu. La elekto estas via.",
"version": "1.0.3.6",
"homepage_url": "https://ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/",
"author": "Ss",
"permissions": [
"<all_urls>",
"activeTab",
"tabs",
"webRequest",
"webRequestBlocking",
"webNavigation",
"notifications",
"storage",
"unlimitedStorage"
],
"icons": {
"72": "icons/72.png"
},
"background": {
"scripts": [
"cf.js"
]
},
"options_ui": {
"browser_style": true,
"page": "cg.html"
},
"browser_action": {
"browser_style": true,
"default_icon": {
"32": "icons/cf_0.png"
}
},
"applications": {
"gecko": {
"id": "bcma@searxes.eu.org",
"strict_min_version": "68.0",
"update_url": "https://api.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/_/addon.php?for=bcma"
}
}
}