summaryrefslogtreecommitdiffstats
path: root/addon_firefox
diff options
context:
space:
mode:
authorwritecode <wri@tec.ode>2019-05-06 02:30:13 +0000
committerwritecode <wri@tec.ode>2019-05-06 02:30:13 +0000
commite622b7052ea77a2e91cf80d44bccc9ef910ec10e (patch)
treee93a66fa7b4885dc08ac1a9d88e68efdf5f1ab80 /addon_firefox
parentefbfa8eea97b03e6dfe58479dd27e84c621ab931 (diff)
downloadcloudflare-tor-e622b7052ea77a2e91cf80d44bccc9ef910ec10e.tar
cloudflare-tor-e622b7052ea77a2e91cf80d44bccc9ef910ec10e.tar.gz
cloudflare-tor-e622b7052ea77a2e91cf80d44bccc9ef910ec10e.tar.lz
cloudflare-tor-e622b7052ea77a2e91cf80d44bccc9ef910ec10e.tar.xz
cloudflare-tor-e622b7052ea77a2e91cf80d44bccc9ef910ec10e.zip
Upload files to 'addon_firefox/ismitmlink'
Diffstat (limited to 'addon_firefox')
-rw-r--r--addon_firefox/ismitmlink/bg.js49
-rw-r--r--addon_firefox/ismitmlink/cs.js4
-rw-r--r--addon_firefox/ismitmlink/manifest.json4
3 files changed, 32 insertions, 25 deletions
diff --git a/addon_firefox/ismitmlink/bg.js b/addon_firefox/ismitmlink/bg.js
index 6a2a9393..61ad2383 100644
--- a/addon_firefox/ismitmlink/bg.js
+++ b/addon_firefox/ismitmlink/bg.js
@@ -1,11 +1,11 @@
let apiurl = 'https://searxes.danwin1210.me/collab/open/ismitm.php';
let TORapiurl = 'http://searxes.nmqnkngye4ct7bgss4bmv5ca3wpa55yugvxen5kz2bbq67lwy6ps54yd.onion/collab/open/ismitm.php';
-fetch('http://searxes.nmqnkngye4ct7bgss4bmv5ca3wpa55yugvxen5kz2bbq67lwy6ps54yd.onion/collab/open/hi.php', {
+fetch('http://searxes.nmqnkngye4ct7bgss4bmv5ca3wpa55yugvxen5kz2bbq67lwy6ps54yd.onion/collab/open/ok', {
method: 'GET',
mode: 'cors'
}).then(r => r.text()).then(r => {
- if (r == 'hi') {
+ if (r == 'ok') {
apiurl = TORapiurl;
}
}).catch(() => {});
@@ -56,22 +56,29 @@ function i_remember_you(f, t) {
});
}
-browser.storage.local.clear().then(() => {
- browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
- if (request && sender) {
- i_already_know_you(request).then((r) => {
- if (r == 1 || r == -1) {
- browser.tabs.sendMessage(sender.tab.id, [request, ((r == 1) ? true : false)]);
- }
- if (r == 0) {
- is_infected(request).then((a) => {
- i_remember_you(request, a);
- browser.tabs.sendMessage(sender.tab.id, [request, a]);
- }, () => {
- browser.tabs.sendMessage(sender.tab.id, [request, false]);
- });
- }
- }, () => {});
- }
- });
-}, () => {}); \ No newline at end of file
+function clear_cache_week() {
+ browser.storage.local.clear();
+ setTimeout(function () {
+ clear_cache_week();
+ }, 604800000);
+}
+
+clear_cache_week();
+
+browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
+ if (request && sender) {
+ i_already_know_you(request).then((r) => {
+ if (r == 1 || r == -1) {
+ browser.tabs.sendMessage(sender.tab.id, [request, ((r == 1) ? true : false)]);
+ }
+ if (r == 0) {
+ is_infected(request).then((a) => {
+ i_remember_you(request, a);
+ browser.tabs.sendMessage(sender.tab.id, [request, a]);
+ }, () => {
+ browser.tabs.sendMessage(sender.tab.id, [request, false]);
+ });
+ }
+ }, () => {});
+ }
+});
diff --git a/addon_firefox/ismitmlink/cs.js b/addon_firefox/ismitmlink/cs.js
index 1361a666..fdc2fe02 100644
--- a/addon_firefox/ismitmlink/cs.js
+++ b/addon_firefox/ismitmlink/cs.js
@@ -6,8 +6,8 @@ if (document.body && !['searxes.danwin1210.me', 'searxes.nmqnkngye4ct7bgss4bmv5c
})();
if (cs) {
cs.insertRule("a[data-mitm]{text-decoration-line:line-through !important;text-decoration-color:red !important;text-decoration-style:double !important}", 0);
- cs.insertRule("a[data-mitm]::before{content:'[MITM!]';font-weight:bold !important;color:red !important}", 1);
- cs.insertRule("a[data-mitm]:hover::before{content:'[Privacy Risk!!]'}", 2);
+ cs.insertRule("a[data-mitm]::before{content:'[\\26A0]';font-weight:bold !important;color:red !important;display:inline-block !important}", 1);
+ cs.insertRule("a[data-mitm]:hover::before{content:'[\\26A1]'}", 2);
cs.insertRule("a[data-mitm]:hover{color:red !important}", 3);
}
let asked = ['searxes.danwin1210.me', 'searxes.nmqnkngye4ct7bgss4bmv5ca3wpa55yugvxen5kz2bbq67lwy6ps54yd.onion', 'searxes.cyb', 'addons.mozilla.org'];
diff --git a/addon_firefox/ismitmlink/manifest.json b/addon_firefox/ismitmlink/manifest.json
index f064778d..5b4b7913 100644
--- a/addon_firefox/ismitmlink/manifest.json
+++ b/addon_firefox/ismitmlink/manifest.json
@@ -2,8 +2,8 @@
"manifest_version": 2,
"name": "Are links vulnerable to MITM attack?",
"description": "Scan FQDN using Searxes' API",
- "version": "1.0.4",
- "homepage_url": "https://notabug.org/themusicgod1/cloudflare-tor/src/master/ismitmlink",
+ "version": "1.0.5",
+ "homepage_url": "https://notabug.org/themusicgod1/cloudflare-tor",
"author": "Maslin Bossé",
"permissions": [
"storage",