--- /dev/null
+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)
--- /dev/null
+<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>
+
--- /dev/null
+{
+ "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"
+ ]
+}
--- /dev/null
+<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>
+