mirror of
https://codeberg.org/crimeflare/cloudflare-tor
synced 2024-12-24 00:20:41 +00:00
Upload files to 'addon_chrome/whyrejectme'
This commit is contained in:
parent
2384a610d7
commit
4daec00186
34
addon_chrome/whyrejectme/bg.js
Normal file
34
addon_chrome/whyrejectme/bg.js
Normal file
@ -0,0 +1,34 @@
|
||||
let history = {};
|
||||
|
||||
chrome.webRequest.onResponseStarted.addListener(i => {
|
||||
if ([403, 406, 410, 451, 462].includes(i.statusCode)) {
|
||||
let iFQDN = (new URL(i.url)).hostname;
|
||||
if (iFQDN == 'searxes.eu.org' || iFQDN == 'AAAsearxes.nmqnkngye4ct7bgss4bmv5ca3wpa55yugvxen5kz2bbq67lwy6ps54yd.onion') {
|
||||
return;
|
||||
}
|
||||
let iServer = 'Unknown';
|
||||
i.responseHeaders.forEach(x => {
|
||||
if (x.name == 'Server') {
|
||||
iServer = x.value;
|
||||
}
|
||||
});
|
||||
let iDate = (new Date()).toUTCString();
|
||||
history[iFQDN] = [i.url, iServer, i.statusCode, iDate];
|
||||
}
|
||||
return;
|
||||
}, {
|
||||
urls: ['http://*/*', 'https://*/*'],
|
||||
types: ['main_frame']
|
||||
}, ['responseHeaders']);
|
||||
|
||||
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
if (request && sender) {
|
||||
if (request == 'get') {
|
||||
sendResponse(history);
|
||||
}
|
||||
if (request == 'clear') {
|
||||
history = {};
|
||||
sendResponse(true);
|
||||
}
|
||||
}
|
||||
});
|
17
addon_chrome/whyrejectme/log.html
Normal file
17
addon_chrome/whyrejectme/log.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Log</title>
|
||||
</head>
|
||||
<body style="display:none">
|
||||
<table style="width:90%;break-word:" border=1>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<br>
|
||||
↑ Details<br>
|
||||
→ Action: <input id="clear" type="button" value=" Clear Log "><br>
|
||||
↓ FQDN only<br>
|
||||
<br>
|
||||
<textarea id="export" cols=60 rows=20></textarea>
|
||||
<script src="log.js"></script>
|
||||
</body>
|
||||
</html>
|
22
addon_chrome/whyrejectme/log.js
Normal file
22
addon_chrome/whyrejectme/log.js
Normal file
@ -0,0 +1,22 @@
|
||||
function newrow(w) {
|
||||
let tt = document.getElementsByTagName('tbody')[0];
|
||||
let tr = tt.insertRow(tt.rows.length);
|
||||
tr.innerHTML = w;
|
||||
}
|
||||
|
||||
newrow('<tr><td><b>FQDN</b></td><td><b>Server</b></td><td><b>Code</b></td><td><b>Where</b></td><td><b>When</b></td></tr>');
|
||||
|
||||
chrome.runtime.sendMessage('get', function (g) {
|
||||
for (let k in g) {
|
||||
newrow('<tr><td>' + k + '</td><td>' + g[k][1] + '</td><td>' + g[k][2] + '</td><td><a href="' + g[k][0] + '" rel="noreferrer" target="_blank">Link</a></td><td>' + g[k][3] + '</td></tr>');
|
||||
document.getElementById('export').innerHTML += k + "\n";
|
||||
}
|
||||
});
|
||||
|
||||
document.body.style.display = 'block';
|
||||
|
||||
document.getElementById('clear').addEventListener('click', () => {
|
||||
chrome.runtime.sendMessage('clear', function () {
|
||||
location.reload(true);
|
||||
});
|
||||
});
|
25
addon_chrome/whyrejectme/manifest.json
Normal file
25
addon_chrome/whyrejectme/manifest.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Which website rejected me?",
|
||||
"version": "1.0.2",
|
||||
"minimum_chrome_version": "60",
|
||||
"homepage_url": "https://notabug.org/crimeflare/cloudflare-tor",
|
||||
"author": "Daniel J. Schreiber",
|
||||
"incognito": "split",
|
||||
"permissions": [
|
||||
"webRequest",
|
||||
"<all_urls>"
|
||||
],
|
||||
"icons": {
|
||||
"32": "icons/32.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"bg.js"
|
||||
]
|
||||
},
|
||||
"options_ui": {
|
||||
"open_in_tab": true,
|
||||
"page": "log.html"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user