-content xtnd chrome/content/
-
+content gssweb chrome/content/ contentaccessible=yes
+resource gsseap chrome/resource/
+console.log('Loading nav.gss.js - #1');
/*
* Copyright (c) 2014, JANET(UK)
* All rights reserved.
*
*/
-console.log('Loading navigator.gss.js - #9');
+console.log('Loading navigator.gss.js - #1');
-/*
navigator.generateNonce = function() {
// TODO: Make sure that we don't have a collision!
// Random integer in the range [0..(2^32-1)]
return Math.floor(Math.random() * ( 4294967295 )) ;
}
-*/
return GSSEap;
})();
-function newGSSEap(config)
-{
- return new GSSEap(config);
-}
-
-//var nav = createObjectIn(unsafeWindow, {defineAs: "navigator"});
-var bob = createObjectIn(unsafeWindow, {defineAs: "bob"});
-var gss_eap = createObjectIn(bob, {defineAs: "gss_eap"});
-var gss_eap_proto = createObjectIn(gss_eap, {defineAs: "prototype"});
-
-exportFunction(GSSEap.prototype.constructor, gss_eap_proto, {allowCallbacks: true, :defineAs: 'constructor'});
-
-/*
-exportFunction(, gss_eap, {allowCallbacks: true});
-exportFunction(, gss_eap, {allowCallbacks: true});
-exportFunction(, gss_eap, {allowCallbacks: true});
-exportFunction(, gss_eap, {allowCallbacks: true});
-exportFunction(, gss_eap, {allowCallbacks: true});
-*/
-
-/* exportFunction(GSSEap, nav, {defineAs: "gss_eap"});
-exportFunction(GSSEap, unsafeWindow.navigator, {defineAs: "gss_eap_2"})
-exportFunction(newGSSEap, nav, {defineAs: "gss_eap_3"})
-*/
-
-/*
-exportFunction(newGSSEap, bob, {defineAs: 'newbob'});
-exportFunction(doHello, bob, {defineAs: 'doHello'});
-*/
+navigator.gss_eap = GSSEap;
console.log('Loading navigator.gss.js - #9');
+navigator.generateNonce = function() {
+ // TODO: Make sure that we don't have a collision!
+ // Random integer in the range [0..(2^32-1)]
+ return Math.floor(Math.random() * ( 4294967295 )) ;
+}
+
+
+
/* This file gets injected into the web page verbatim */
var GSSEap = (function ()
return GSSEap;
})();
-navigator.gss_eap = GSSEap;
+
-console.log("Bob is here. #1");
+console.log("Bob is here. #2");
-var GSSEap = (function ()
- {
- function GSSEap(config)
- {
- console.log("BobBobBob");
- };
-
- return GSSEap;
- }
-)();
+function addScript(url) {
+ var elt = document.createElement("script");
+ elt.setAttribute("src", url );
+ elt.setAttribute('type', 'text/javascript');
+ document.body.appendChild(elt);
+}
-
-
-unsafeWindow.navigator.GSSEap =
- cloneInto(GSSEap,
- unsafeWindow,
- { cloneFunctions: true,
- wrapReflectors: true});
-
-var mesaGSS = createObjectIn(unsafeWindow, {defineAs: "mesaGSS"});
-function sayHello(addressee)
-{
- console.log("Saying hello to " + addressee);
- return("Hello, " + addressee);
-};
-exportFunction(sayHello, mesaGSS, { defineAs: "sayHello" });
-
-console.log("Bob is leaving. #1");
-
-/*
- * Gives us navigator.gss_eap, but "new navigator.gss_eap()" returns "not a constructor"
-unsafeWindow.navigator.gss_eap = cloneInto(GSSEap, unsafeWindow, {cloneFunctions: true});
-*/
-
-
-// unsafeWindow.gss_eap = cloneInto(GSSEap, unsafeWindow);
-
-//var gss_eap = createObjectIn(unsafeWindow.navigator, {defineAs: 'gss_eap'});
-//var gss_eap_prototype = createObjectIn(gss_eap, {defineAs: 'prototype'});
-//exportFunction(GSSEap.prototype.constructor, gss_eap_prototype, {defineAs: 'constructor'});
-
-//exportFunction(GSSEap, unsafeWindow.navigator, {defineAs: 'gss_eap'});
+addScript('chrome://gssweb/content/nav.gss.js');
"id": "jid1-NfTB1x7j36TqCw",
"description": "GSS-EAP and GSSWeb package provider",
- "unsafe-content-script": true,
-
"author": "mark@painless-security.com",
"license": "Copyright (c) 2014, JANET(UK)\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n3. Neither the name of JANET(UK) nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\nCOPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\nINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\nSTRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\nOF THE POSSIBILITY OF SUCH DAMAGE.",
"version": "0.1"