Web Security

Increase cybersecurity in every way: force HTTPS, filter out bad urls, scams, malware, shock sites, etc.

  1. // ==UserScript==
  2. // @name Web Security
  3. // @namespace https://greasyfork.org/en/users/198860-flarez-gaming
  4. // @version 0.3
  5. // @description Increase cybersecurity in every way: force HTTPS, filter out bad urls, scams, malware, shock sites, etc.
  6. // @author fz
  7. // @match *://*/*
  8. // @grant unsafeWindow
  9. // @run-at document-start
  10. // @require https://greasyfork.org/scripts/410512-sci-js-from-ksw2-center/code/scijs%20(from%20ksw2-center).js
  11.  
  12. // ==/UserScript==
  13.  
  14. //sci.js is not used for analytics here, it is actually used to scan for threats
  15.  
  16. if (window.location.protocol != "https:") window.location.protocol = "https:";
  17.  
  18. var xml;
  19. var arr = ["https://cdn.glitch.com/94b7438a-e136-41db-80b8-a78ea1a6e027%2Fdomain%20list.txt?v=1592968773112"]; //cached blocklist from http://mirror1.malwaredomains.com/files/domains.txt
  20. xml = new XMLHttpRequest(); xml.open("GET", arr[0], true); xml.send();
  21. var resp = xml.responseText.split("\n");
  22. resp.shift();resp.shift();resp.shift();resp.shift();
  23. resp = resp.map((e)=>{return e.slice(2, (e).slice(2, -1).indexOf(" ") + 2)});
  24. //resp = resp.concat(["www.google.com"]); was for testing malicious domains
  25.  
  26. if (resp.includes(location.hostname)) {
  27. unsafeWindow.onbeforeunload = null;
  28. window.location = "https://blank.org";
  29. };