chromium extension dnssec-drill ( inspired by firefox drill extension: http://www...
authorHarvie <tomas@mudrunka.cz>
Fri, 6 Aug 2010 03:02:12 +0000 (05:02 +0200)
committerHarvie <tomas@mudrunka.cz>
Fri, 6 Aug 2010 03:02:12 +0000 (05:02 +0200)
plugins/chrome-extensions/dnssec-drill/README.md [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/application-certificate.png [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/background.html [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/gtk-dialog-question.png [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/ico-big.png [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/manifest.json [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/options.html [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/security-high.png [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/security-low.png [new file with mode: 0644]
plugins/chrome-extensions/dnssec-drill/security-medium.png [new file with mode: 0644]

diff --git a/plugins/chrome-extensions/dnssec-drill/README.md b/plugins/chrome-extensions/dnssec-drill/README.md
new file mode 100644 (file)
index 0000000..0c0478c
--- /dev/null
@@ -0,0 +1,9 @@
+Simple DNSSEC validator plugin for chromium, but it's in early stage of development but it works somehow. Only thing it does is showing red icon on fraudent sites and yellow on every other site (trusted and non-signed). it uses external binary of program called drill (from ldns or libldns package), which is launched with npexec plugin (NPAPI which enables you to call system() call from javascript) right now it's synchronous and therefore very slow. i want to implement following things in future (if i will found it usefull):
+
+TODO:
+* multiple DNSSEC lookups at the time (asynchronous or multithreaded NPAPI plugin).
+* block user from using sites with fraudent DNS records (not only showing icons)
+* distinguish between non-signed and secure domains (parse drill output or patch drill)
+* compile NPAPI plugin for Windows, Linux64 and MacOS. Currently i have only .so for 32bit Linux, but it should build as it is without any code changes.
+* pack static drill binary and root-zone key to plugin
+* plugin configuration page (change drill binary path or root-zone certificate, whitelist domains)
diff --git a/plugins/chrome-extensions/dnssec-drill/application-certificate.png b/plugins/chrome-extensions/dnssec-drill/application-certificate.png
new file mode 100644 (file)
index 0000000..565af99
Binary files /dev/null and b/plugins/chrome-extensions/dnssec-drill/application-certificate.png differ
diff --git a/plugins/chrome-extensions/dnssec-drill/background.html b/plugins/chrome-extensions/dnssec-drill/background.html
new file mode 100644 (file)
index 0000000..a79545f
--- /dev/null
@@ -0,0 +1,40 @@
+<html><head>
+<meta http-equiv="refresh" content="10" /> 
+</head>
+<body>
+       <embed type="application/x-system-call" id="pluginId" width="0" height="0">Plugin FAILED to load</embed>
+       <script>
+         var plugin = document.getElementById("pluginId");
+         /*var result = plugin.myPluginMethod();  // call a method in your plugin
+         console.log("my plugin returned: " + result);*/
+
+                       function doDrill(tabId, changeInfo, tab) {
+                               var domain = tab.url.match(/:\/\/(.[^/]+)/)[1];
+        chrome.pageAction.show(tabId);
+                               
+                               //alert('drill -k /etc/trusted-key.key -TD ' + domain);
+                               var ret = plugin.system('drill -k /etc/trusted-key.key -TD ' + domain);
+                               //alert(ret);
+        if(ret > 0) {
+                                       chrome.pageAction.setIcon({path:"security-low.png", tabId:tab.id});
+                                       chrome.pageAction.setTitle({tabId:tab.id, title:"DNSSEC key invalid!"});
+        } else {
+                                       chrome.pageAction.setIcon({path:"security-medium.png", tabId:tab.id});
+                                       chrome.pageAction.setTitle({tabId:tab.id, title:"DNSSEC key valid or not found..."});
+                               }
+        chrome.pageAction.show(tabId);
+                       }
+
+                 // Called when the url of a tab changes.
+      function checkForValidUrl(tabId, changeInfo, tab) {
+                               chrome.pageAction.setIcon({path:"gtk-dialog-question.png", tabId:tab.id});
+                               chrome.pageAction.setTitle({tabId:tab.id, title:"DNSSEC resolving in progress... Please wait..."});
+                               var drill = setTimeout(function() { doDrill(tabId, changeInfo, tab); }, 0);
+      };
+
+      // Listen for any changes to the URL of any tab.
+      chrome.tabs.onUpdated.addListener(checkForValidUrl);
+       </script>
+</body>
+</html>
+
diff --git a/plugins/chrome-extensions/dnssec-drill/gtk-dialog-question.png b/plugins/chrome-extensions/dnssec-drill/gtk-dialog-question.png
new file mode 100644 (file)
index 0000000..c7a3968
Binary files /dev/null and b/plugins/chrome-extensions/dnssec-drill/gtk-dialog-question.png differ
diff --git a/plugins/chrome-extensions/dnssec-drill/ico-big.png b/plugins/chrome-extensions/dnssec-drill/ico-big.png
new file mode 100644 (file)
index 0000000..d198f0a
Binary files /dev/null and b/plugins/chrome-extensions/dnssec-drill/ico-big.png differ
diff --git a/plugins/chrome-extensions/dnssec-drill/manifest.json b/plugins/chrome-extensions/dnssec-drill/manifest.json
new file mode 100644 (file)
index 0000000..4db5644
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "name": "Drill DNSSEC Validator. Using NPAPI plugin to launch Drill utility available in ldns package.",
+  "version": "0.1",
+  "description": "",
+       "icons": {
+      "128": "security-high.png",
+      "16": "security-high.png",
+      "32": "security-high.png",
+      "48": "security-high.png"
+   },  
+       "background_page": "background.html",
+       "options_page": "options.html",
+       "page_action": {
+    "default_icon": "gtk-dialog-question.png", // required
+    "default_title": "DNSSEC Validator"    // optional; shown in tooltip
+    //,"default_popup": "popup.html"    // optional
+  },
+       "plugins": [
+    { "path": "npexec.so", "public": false }
+    /*{ "path": "npexec64.so" },
+    { "path": "npexec.dll" }*/
+  ],
+  "permissions": [
+    "tabs"
+  ]
+}
diff --git a/plugins/chrome-extensions/dnssec-drill/options.html b/plugins/chrome-extensions/dnssec-drill/options.html
new file mode 100644 (file)
index 0000000..8d136ad
--- /dev/null
@@ -0,0 +1,62 @@
+<html>
+<head><title>Kyberia Notificator Options</title>
+<style>
+* {
+       color: lime;
+       background: black;      
+}
+</style>
+</head>
+<script type="text/javascript">
+
+
+if(!localStorage["name"]) localStorage["name"] = "";
+if(!localStorage["pass"]) localStorage["pass"] = "";
+if(!localStorage["type"]) localStorage["type"] = "name";
+if(!localStorage["secs"]) localStorage["secs"] = 30;
+
+// Saves options to localStorage.
+function save_options() {
+  localStorage["name"] = document.getElementById("name").value;
+  localStorage["pass"] = document.getElementById("pass").value;
+  localStorage["type"] = document.getElementById("type").value;
+  localStorage["secs"] = document.getElementById("secs").value;
+       localStorage["reconnect"] = 1;
+}
+
+// Restores select box state to saved value from localStorage.
+function restore_options() {
+  document.getElementById("name").value = localStorage["name"];
+  document.getElementById("pass").value = localStorage["pass"];
+  document.getElementById("type").value = localStorage["type"];
+  document.getElementById("secs").value = localStorage["secs"];
+}
+
+</script>
+
+<body onload="restore_options()">
+
+<div style="text-align: center; width: 100%;">
+<pre><h1>Kyberia.sk Mail Notificator</h1>
+name: <input type="text" id="name" />
+pass: <input type="password" id="pass" />
+type: <input type="text" id="type" title="login type (name|id)" />
+secs: <input type="text" id="secs" title="refresh interval in seconds" />
+<button onclick="save_options()">Save</button></pre>
+</div>
+
+<pre style="float: right;">
+  ___ ___                          __         
+ /   |   \ _____   _______ ___  __|__|  ____  
+/    ~    \\__  \  \_  __ \\  \/ /|  |_/ __ \ 
+\    Y    / / __ \_ |  | \/ \   / |  |\  ___/ 
+ \___|_  / (____  / |__|     \_/  |__| \___  >
+       \/       \/                         \/ 
+
+Brought to you by <a href="https://kyberia.sk/id/3764224">Harvie</a> 2o1o (<a href="http://blog.harvie.cz/">blog</a>).
+</pre>
+<img src="ico-big.png" style="float: left;" />
+
+</body>
+</html>
+
diff --git a/plugins/chrome-extensions/dnssec-drill/security-high.png b/plugins/chrome-extensions/dnssec-drill/security-high.png
new file mode 100644 (file)
index 0000000..34ac983
Binary files /dev/null and b/plugins/chrome-extensions/dnssec-drill/security-high.png differ
diff --git a/plugins/chrome-extensions/dnssec-drill/security-low.png b/plugins/chrome-extensions/dnssec-drill/security-low.png
new file mode 100644 (file)
index 0000000..7ba8312
Binary files /dev/null and b/plugins/chrome-extensions/dnssec-drill/security-low.png differ
diff --git a/plugins/chrome-extensions/dnssec-drill/security-medium.png b/plugins/chrome-extensions/dnssec-drill/security-medium.png
new file mode 100644 (file)
index 0000000..0ebe638
Binary files /dev/null and b/plugins/chrome-extensions/dnssec-drill/security-medium.png differ
This page took 0.233952 seconds and 4 git commands to generate.