mirror of
				https://codeberg.org/crimeflare/cloudflare-tor
				synced 2025-11-04 10:27:05 +01:00 
			
		
		
		
	Upload files to 'addon_firefox/ismitmlink'
This commit is contained in:
		
							parent
							
								
									efbfa8eea9
								
							
						
					
					
						commit
						e622b7052e
					
				
					 3 changed files with 32 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -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]);
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
			}, () => {});
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
}, () => {});
 | 
			
		||||
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]);
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
		}, () => {});
 | 
			
		||||
	}
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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'];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue