Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <html> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>hi</title> |
michael@0 | 4 | <script> |
michael@0 | 5 | |
michael@0 | 6 | var count = 0; |
michael@0 | 7 | |
michael@0 | 8 | |
michael@0 | 9 | function test() { |
michael@0 | 10 | } |
michael@0 | 11 | |
michael@0 | 12 | test.prototype = |
michael@0 | 13 | { |
michael@0 | 14 | onChange: function (accessPoints) |
michael@0 | 15 | { |
michael@0 | 16 | netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); |
michael@0 | 17 | var d = document.getElementById("d"); |
michael@0 | 18 | d.innerHTML = ""; |
michael@0 | 19 | |
michael@0 | 20 | for (var i=0; i<accessPoints.length; i++) { |
michael@0 | 21 | var a = accessPoints[i]; |
michael@0 | 22 | d.innerHTML = d.innerHTML + "<p>" + a.mac + " " + a.ssid + " " + a.signal + "</p>"; |
michael@0 | 23 | } |
michael@0 | 24 | |
michael@0 | 25 | var c = document.getElementById("c"); |
michael@0 | 26 | c.innerHTML = "<p>" + count++ + "</p>"; |
michael@0 | 27 | |
michael@0 | 28 | }, |
michael@0 | 29 | |
michael@0 | 30 | onError: function (value) { |
michael@0 | 31 | alert("error: " +value); |
michael@0 | 32 | }, |
michael@0 | 33 | |
michael@0 | 34 | QueryInterface: function(iid) { |
michael@0 | 35 | netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); |
michael@0 | 36 | if (iid.equals(Components.interfaces.nsIWifiListener) || |
michael@0 | 37 | iid.equals(Components.interfaces.nsISupports)) |
michael@0 | 38 | return this; |
michael@0 | 39 | throw Components.results.NS_ERROR_NO_INTERFACE; |
michael@0 | 40 | }, |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | |
michael@0 | 44 | netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); |
michael@0 | 45 | |
michael@0 | 46 | var listener = new test(); |
michael@0 | 47 | var wifi_service = Components.classes["@mozilla.org/wifi/monitor;1"].getService(Components.interfaces.nsIWifiMonitor); |
michael@0 | 48 | |
michael@0 | 49 | wifi_service.startWatching(listener); |
michael@0 | 50 | |
michael@0 | 51 | |
michael@0 | 52 | |
michael@0 | 53 | </script> |
michael@0 | 54 | </head> |
michael@0 | 55 | |
michael@0 | 56 | <body> |
michael@0 | 57 | <div id="d"><p></p></div> |
michael@0 | 58 | <div id="c"><p></p></div> |
michael@0 | 59 | </body> |
michael@0 | 60 | </html> |