Revision: 54050
Updated Code
at December 8, 2011 16:19 by mejamiewilson
Updated Code
javascript: var netGuard = "TYPE-YOUR-NETGUARD-HERE-LEFT-TO-RIGHT-TOP-TO-BOTTOM-NO-SPACES"; jQuery("#SFAForm div:eq(1)").html("Type in what you see in the boxes then hit Login"); var replace = '<div><div class="fieldwrapper inline-block width-33pc"><input id="SFAForm:netguardResponse0" type="text" autocomplete="off" value="" maxlength="2" class="netguardhelper helper1 input text width-100pc x-large padding-vertical-5px strong-text no-rounded no-margin align-center netguardnumber"></div><div class="fieldwrapper inline-block no-border-left width-34pc margin-left-minus-1px"><input id="SFAForm:netguardResponse1" type="text" autocomplete="off" value="" maxlength="2" class="netguardhelper helper2 input text width-100pc x-large padding-vertical-5px strong-text no-rounded no-margin align-center netguardnumber"></div><div class="fieldwrapper inline-block no-border-left width-33pc margin-left-minus-1px"><input id="SFAForm:netguardResponse2" type="text" autocomplete="off" value="" maxlength="2" class="netguardhelper helper3 input text width-100pc x-large padding-vertical-5px strong-text no-rounded no-margin align-center netguardnumber" ></div></div>'; var fieldsTop = jQuery("#SFAForm div:eq(5)"); var fieldsBottom = jQuery("#SFAForm div:eq(9)"); var fieldsTopRepeat = fieldsTop.clone(); var fieldsBottomRepeat = fieldsBottom.clone(); fieldsBottom.find("input").attr("readonly", true).css({opacity: 0.4, "border-top":"none"}); fieldsTop.after(replace); jQuery(".netguardhelper").live("keyup", function() { if(this.value.length==2) { var startInt = 0; var me = this.value.split(''); var card = netGuard.split(''); me[0] = me[0].toUpperCase(); startInt = (parseInt(me[1]) -1) * 7; if(me[0]=="B") startInt = startInt + 1; if(me[0]=="C") startInt = startInt + 2; if(me[0]=="D") startInt = startInt + 3; if(me[0]=="E") startInt = startInt + 4; if(me[0]=="F") startInt = startInt + 5; if(me[0]=="G") startInt = startInt + 6; if(jQuery(this).hasClass("helper1")) { jQuery('input[id$="challengeResponse0"]').val(card[parseInt(startInt)]); } if(jQuery(this).hasClass("helper2")) { jQuery('input[id$="challengeResponse1"]').val(card[parseInt(startInt)]); } if(jQuery(this).hasClass("helper3")) { jQuery('input[id$="challengeResponse2"]').val(card[parseInt(startInt)]); } } });
Revision: 54049
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 8, 2011 15:23 by mejamiewilson
Initial Code
javascript: var netGuard = "TYPE-YOUR-NETGUARD-HERE-LEFT-TO-RIGHT-TOP-TO-BOTTOM-NO-SPACES"; jQuery("#SFAForm div:eq(1)").html("Type in what you see in the boxes then hit Login"); var replace = '<div><div class="fieldwrapper inline-block width-33pc"><input id="SFAForm:netguardResponse0" type="text" autocomplete="off" value="" maxlength="2" class="netguardhelper helper1 input text width-100pc x-large padding-vertical-5px strong-text no-rounded no-margin align-center netguardnumber"></div><div class="fieldwrapper inline-block no-border-left width-34pc margin-left-minus-1px"><input id="SFAForm:netguardResponse1" type="text" autocomplete="off" value="" maxlength="2" class="netguardhelper helper2 input text width-100pc x-large padding-vertical-5px strong-text no-rounded no-margin align-center netguardnumber"></div><div class="fieldwrapper inline-block no-border-left width-33pc margin-left-minus-1px"><input id="SFAForm:netguardResponse2" type="text" autocomplete="off" value="" maxlength="2" class="netguardhelper helper3 input text width-100pc x-large padding-vertical-5px strong-text no-rounded no-margin align-center netguardnumber" ></div></div>'; var fieldsTop = jQuery("#SFAForm div:eq(5)"); var fieldsBottom = jQuery("#SFAForm div:eq(9)"); var fieldsTopRepeat = fieldsTop.clone(); var fieldsBottomRepeat = fieldsBottom.clone(); fieldsBottom.find("input").attr("readonly", true).css({opacity: 0.4, "border-top":"none"}); fieldsTop.after(replace); jQuery(".netguardhelper").live("keyup", function() { if(this.value.length==2) { var startInt = 0; var me = this.value.split(''); var card = netGuard.split(''); me[0] = me[0].toUpperCase(); startInt = (parseInt(me[1]) -1) * 7; console.log("START", startInt); if(me[0]=="B") startInt = startInt + 1; if(me[0]=="C") startInt = startInt + 2; if(me[0]=="D") startInt = startInt + 3; if(me[0]=="E") startInt = startInt + 4; if(me[0]=="F") startInt = startInt + 5; if(me[0]=="G") startInt = startInt + 6; console.log(card[parseInt(startInt)]); if(jQuery(this).hasClass("helper1")) { jQuery('input[id$="challengeResponse0"]').val(card[parseInt(startInt)]); } if(jQuery(this).hasClass("helper2")) { jQuery('input[id$="challengeResponse1"]').val(card[parseInt(startInt)]); } if(jQuery(this).hasClass("helper3")) { jQuery('input[id$="challengeResponse2"]').val(card[parseInt(startInt)]); } } });
Initial URL
Initial Description
In the top line, replace the netGuard value with your netguard key, type from left to right, top to bottom. Then add this all as a bookmark in your browser, and click it when you hit the netguard page. Just type in what it's asking of you in the box beneath, ie if it asks A4, type A4 and the bookmark will fill in your netguard for you.
Initial Title
NetGuard Helper
Initial Tags
Initial Language
JavaScript