From 3ea04be18307e510af02c051c3c853f5247d3bbb Mon Sep 17 00:00:00 2001 From: Dhiraj Mishra Date: Sat, 12 Oct 2024 10:33:24 +0400 Subject: [PATCH] Delete SmuggleSheild directory --- SmuggleSheild/content.js | 177 --------------------------- SmuggleSheild/icon/SmuggleSheild.png | Bin 195904 -> 0 bytes SmuggleSheild/manifest.json | 41 ------- SmuggleSheild/popup.html | 85 ------------- SmuggleSheild/popup.js | 27 ---- 5 files changed, 330 deletions(-) delete mode 100644 SmuggleSheild/content.js delete mode 100644 SmuggleSheild/icon/SmuggleSheild.png delete mode 100644 SmuggleSheild/manifest.json delete mode 100644 SmuggleSheild/popup.html delete mode 100644 SmuggleSheild/popup.js diff --git a/SmuggleSheild/content.js b/SmuggleSheild/content.js deleted file mode 100644 index d7cb491..0000000 --- a/SmuggleSheild/content.js +++ /dev/null @@ -1,177 +0,0 @@ -class HTMLSmugglingBlocker { - constructor() { - this.blocked = false; this.suspiciousPatterns = [ - { pattern: /atob\s*\([^)]+\).*new\s+uint8array/is, weight: 3 }, - { pattern: /atob\s*\(\s*['"]([A-Za-z0-9+/=]{100,})['"].*\)/i, weight: 3 }, - { pattern: /new\s+blob\s*\(\s*\[\s*(?:data|atob\s*\()/i, weight: 3 }, - { pattern: /url\.createobjecturl\s*\(\s*(?:my)?blob\s*\)/i, weight: 3 }, - { pattern: /location(?:\s*\[\s*["']href["']\s*\])?\s*=\s*url/i, weight: 3 }, - { pattern: /url\.revokeobjecturl\s*\(\s*url\s*\)/i, weight: 2 }, - { pattern: /window\s*\[\s*(?:["']\w+["']\s*\+\s*)+["']\w+["']\s*\]/i, weight: 3 }, - { pattern: /document\s*\[\s*(?:["']\w+["']\s*\+\s*)+["']\w+["']\s*\]\s*\(\s*window\s*\[\s*(?:['"]at['"].*['"]o['"].*['"]b['"]\s*\]|\s*(?:["']\w+["']\s*\+\s*)+["']\w+["']\s*\])\s*\(['"][A-Za-z0-9+/=]+['"]\)\s*\)/i, weight: 4 }, - { pattern: /var\s+\w+=\w+;?\s*\(function\(\w+,\w+\)\{.*while\(!!\[\]\)\{try\{.*parseint.*\}catch\(\w+\)\{.*\}\}\}\(.*\)\);?/is, weight: 4 }, - { pattern: /blob\s*\(\s*\[[^\]]+\]\s*,\s*\{\s*type\s*:\s*['"](?:application\/octet-stream|text\/html|octet\/stream)['"](?:\s*,\s*encoding\s*:\s*['"]base64['"])?\s*\}\s*\)/is, weight: 3 }, - { pattern: /\.style\s*=\s*['"]display:\s*none['"].*\.href\s*=.*\.download\s*=/is, weight: 3 }, - { pattern: /\.click\s*\(\s*\).*url\.revokeobjecturl/is, weight: 3 }, - { pattern: /href\s*=\s*["']data:(?:application\/octet-stream|image\/svg\+xml);base64,/i, weight: 3 }, - { pattern: /webassembly\s*\.\s*(?:instantiate(?:streaming)?|instance)/i, weight: 3 }, - { pattern: /navigator\.serviceworker\.register/i, weight: 2 }, - { pattern: /srcdoc\s*=\s*["'][^"']* - - diff --git a/SmuggleSheild/popup.js b/SmuggleSheild/popup.js deleted file mode 100644 index fad5b47..0000000 --- a/SmuggleSheild/popup.js +++ /dev/null @@ -1,27 +0,0 @@ -console.log("Popup script started"); - -document.addEventListener('DOMContentLoaded', function() { - console.log("DOM content loaded"); - - const exportButton = document.getElementById('export-logs'); - - console.log("Export button:", exportButton); - - exportButton.addEventListener('click', function() { - console.log("Export logs button clicked"); - chrome.runtime.sendMessage({action: "exportLogs"}, function(response) { - console.log("Received export logs response:", response); - if (response && response.logs && response.logs.length > 0) { - const blob = new Blob([JSON.stringify(response.logs, null, 2)], {type: "application/json"}); - const url = URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = 'smuggleshield_logs.json'; - a.click(); - URL.revokeObjectURL(url); - } else { - alert('No logs available to export.'); - } - }); - }); -}); \ No newline at end of file