summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormia03 <mia03@anonymous.i2p>2019-03-05 02:44:56 +0000
committermia03 <mia03@anonymous.i2p>2019-03-05 02:44:56 +0000
commit0aebe29afa195b688eec69e1c1c1945e3186a1af (patch)
tree0482e21e1d690eacb491b9332512c0844dd4d45d
parentb7a503ef512625539dcf7a5071a5de8ab16764b1 (diff)
downloadcloudflare-tor-0aebe29afa195b688eec69e1c1c1945e3186a1af.tar
cloudflare-tor-0aebe29afa195b688eec69e1c1c1945e3186a1af.tar.gz
cloudflare-tor-0aebe29afa195b688eec69e1c1c1945e3186a1af.tar.lz
cloudflare-tor-0aebe29afa195b688eec69e1c1c1945e3186a1af.tar.xz
cloudflare-tor-0aebe29afa195b688eec69e1c1c1945e3186a1af.zip
Upload files to 'not_cloudflare/whyrejectme'
-rw-r--r--not_cloudflare/whyrejectme/bg.js31
-rw-r--r--not_cloudflare/whyrejectme/log.html17
-rw-r--r--not_cloudflare/whyrejectme/log.js22
-rw-r--r--not_cloudflare/whyrejectme/manifest.json30
4 files changed, 100 insertions, 0 deletions
diff --git a/not_cloudflare/whyrejectme/bg.js b/not_cloudflare/whyrejectme/bg.js
new file mode 100644
index 00000000..a60583fa
--- /dev/null
+++ b/not_cloudflare/whyrejectme/bg.js
@@ -0,0 +1,31 @@
+let history = {};
+
+browser.webRequest.onResponseStarted.addListener(i => {
+ if (i.statusCode == 403) {
+ let iFQDN = (new URL(i.url)).hostname;
+ let iServer = 'Unknown';
+ i.responseHeaders.forEach(x => {
+ if (x.name == 'Server') {
+ iServer = x.value;
+ }
+ });
+ let iDate = (new Date()).toUTCString();
+ history[iFQDN] = [i.url, iServer, iDate];
+ }
+ return;
+}, {
+ urls: ['http://*/*', 'https://*/*'],
+ types: ['main_frame']
+}, ['responseHeaders']);
+
+browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
+ if (request && sender) {
+ if (request == 'get') {
+ sendResponse(history);
+ }
+ if (request == 'clear') {
+ history = {};
+ sendResponse(true);
+ }
+ }
+}); \ No newline at end of file
diff --git a/not_cloudflare/whyrejectme/log.html b/not_cloudflare/whyrejectme/log.html
new file mode 100644
index 00000000..611fb9c8
--- /dev/null
+++ b/not_cloudflare/whyrejectme/log.html
@@ -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>
+ &uarr; Details<br>
+ &nbsp;&rarr; Action: <input id="clear" type="button" value=" Clear Log "><br>
+ &darr; FQDN only<br>
+ <br>
+ <textarea id="export" cols=60 rows=20></textarea>
+ <script src="log.js"></script>
+ </body>
+</html> \ No newline at end of file
diff --git a/not_cloudflare/whyrejectme/log.js b/not_cloudflare/whyrejectme/log.js
new file mode 100644
index 00000000..8ea37c78
--- /dev/null
+++ b/not_cloudflare/whyrejectme/log.js
@@ -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>Where</b></td><td><b>When</b></td></tr>');
+
+browser.runtime.sendMessage('get').then(g => {
+ for (let k in g) {
+ newrow('<tr><td>' + k + '</td><td>' + g[k][1] + '</td><td><a href="' + g[k][0] + '" target="_blank">Link</a></td><td>' + g[k][2] + '</td></tr>');
+ document.getElementById('export').innerHTML += k + "\n";
+ }
+});
+
+document.body.style.display = 'block';
+
+document.getElementById('clear').addEventListener('click', () => {
+ browser.runtime.sendMessage('clear').then(() => {
+ location.reload(true);
+ });
+}); \ No newline at end of file
diff --git a/not_cloudflare/whyrejectme/manifest.json b/not_cloudflare/whyrejectme/manifest.json
new file mode 100644
index 00000000..8d50e3b9
--- /dev/null
+++ b/not_cloudflare/whyrejectme/manifest.json
@@ -0,0 +1,30 @@
+{
+ "manifest_version": 2,
+ "name": "Which website rejected me?",
+ "description": "Your website rejected me, but I know I'm going to be okay.",
+ "version": "1.0.0",
+ "author": "Maslin Bossé",
+ "permissions": [
+ "webRequest",
+ "<all_urls>"
+ ],
+ "icons": {
+ "32": "icons/32.png"
+ },
+ "background": {
+ "scripts": [
+ "bg.js"
+ ]
+ },
+ "options_ui": {
+ "browser_style": false,
+ "open_in_tab": true,
+ "page": "log.html"
+ },
+ "applications": {
+ "gecko": {
+ "id": "urejectme@searxes.danwin1210.me",
+ "strict_min_version": "56.0"
+ }
+ }
+} \ No newline at end of file