⇤ ← Revision 1 as of 2015-05-26 08:15:23
2110
Comment:
|
← Revision 2 as of 2015-05-26 08:18:54 ⇥
2372
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
{{{// ==UserScript== // @name Westpac Logon // @namespace joelhockey.com // @version 1.4 // @description Fix the Westpac logon page to allow normal password entry // @include https://online.westpac.com.au/esis/Login/* // @grant none // ==/UserScript== |
// ==UserScript==<<BR>> // @name Westpac Logon<<BR>> // @namespace joelhockey.com<<BR>> // @version 1.4<<BR>> // @description Fix the Westpac logon page to allow normal password entry<<BR>> // @include https://online.westpac.com.au/esis/Login/* <<BR>> // @grant none<<BR>> // ==/UserScript==<<BR>> |
Line 17: | Line 17: |
// new submit function // function newsubmit(event) { // var typedPwd = document.getElementById('pwdinput').value; // var pwdFix = ''; // for (i = 0; i < 6; i++) { // pwdFix += keypadDef['malgm'].charAt(keypadDef['keys'][typedPwd.charAt(i).toUpperCase()]); // } // document.getElementById('password_temp').value=pwdFix; // // alert("hello"); // } |
// new submit function <<BR>> // function newsubmit(event) { <<BR>> // var typedPwd = document.getElementById('pwdinput').value; <<BR>> // var pwdFix = ''; <<BR>> // for (i = 0; i < 6; i++) { <<BR>> // pwdFix += keypadDef['malgm'].charAt(keypadDef['keys'][typedPwd.charAt(i).toUpperCase()]); <<BR>> // } <<BR>> // document.getElementById('password_temp').value=pwdFix; <<BR>> // // alert("hello"); <<BR>> // } <<BR>> <<BR>> // window.addEventListener('btn-submit', newsubmit, true); <<BR>> <<BR>> // // put the pwd box on the screen after username <<BR>> // var username_temp = document.getElementById('username_temp'); <<BR>> // var pwd = document.createElement('div'); <<BR>> // pwd.innerHTML = '<label>Password</label><input id="pwdinput" name="pwdinput" type="password" value=""/><button type="button" onclick="newsubmit()">DoIt</button>'; <<BR>> // username_temp.parentNode.insertBefore(pwd, username_temp.nextSibling); <<BR>> |
Line 28: | Line 36: |
// window.addEventListener('btn-submit', newsubmit, true); // // put the pwd box on the screen after username // var username_temp = document.getElementById('username_temp'); // var pwd = document.createElement('div'); // pwd.innerHTML = '<label>Password</label><input id="pwdinput" name="pwdinput" type="password" value=""/><button type="button" onclick="newsubmit()">DoIt</button>'; // username_temp.parentNode.insertBefore(pwd, username_temp.nextSibling); // put your username and password here if you want to // IT IS A SECURITY RISK IF YOU DO!!! document.getElementById('username_temp').value='44455666'; var pwdfix = ''; var typedPwd = 'hunter2'; console.log(keypadDef['keys']); console.log(keypadDef['malgm']); for (i = 0; i < 6; i++) { pwdfix += keypadDef['malgm'].charAt(keypadDef['keys'][typedPwd.charAt(i).toUpperCase()]); } // console.log(pwdfix); document.getElementById('password_temp').value=pwdfix;}}} |
// put your username and password here if you want to <<BR>> // IT IS A SECURITY RISK IF YOU DO!!! <<BR>> document.getElementById('username_temp').value='44455666'; <<BR>> var pwdfix = ''; <<BR>> var typedPwd = 'hunter2'; <<BR>> // console.log(keypadDef['keys']); <<BR>> // console.log(keypadDef['malgm']); <<BR>> for (i = 0; i < 6; i++) { <<BR>> pwdfix += keypadDef['malgm'].charAt(keypadDef['keys'][typedPwd.charAt(i).toUpperCase()]); <<BR>> } <<BR>> // console.log(pwdfix); <<BR>> document.getElementById('password_temp').value=pwdfix;}}} <<BR>> |
The commented out section is a "proper" way to do it. It inserts a new textbox into which you would type your password, then a button to press that hashes the password using the Westpac-provided one time pad and inserts the result into the real password box.
It doesn't work for me and I gave it a shot at fixing it but could not.
Instead I rewrote the bit at the end to just insert the password that's in the source code. This does mean that your password is stored on disk.
// ==UserScript==
// @name Westpac Logon
// @namespace joelhockey.com
// @version 1.4
// @description Fix the Westpac logon page to allow normal password entry
// @include https://online.westpac.com.au/esis/Login/*
// @grant none
// ==/UserScript==
// new submit function
// function newsubmit(event) {
// var typedPwd = document.getElementById('pwdinput').value;
// var pwdFix = ;
// for (i = 0; i < 6; i++) {
// pwdFix += keypadDef['malgm'].charAt(keypadDef['keys'][typedPwd.charAt(i).toUpperCase()]);
// }
// document.getElementById('password_temp').value=pwdFix;
// // alert("hello");
// }
// window.addEventListener('btn-submit', newsubmit, true);
// // put the pwd box on the screen after username
// var username_temp = document.getElementById('username_temp');
// var pwd = document.createElement('div');
// pwd.innerHTML = '<label>Password</label><input id="pwdinput" name="pwdinput" type="password" value=""/><button type="button" onclick="newsubmit()">DoIt</button>';
// username_temp.parentNode.insertBefore(pwd, username_temp.nextSibling);
// put your username and password here if you want to
// IT IS A SECURITY RISK IF YOU DO!!!
document.getElementById('username_temp').value='44455666';
var pwdfix = ;
var typedPwd = 'hunter2';
// console.log(keypadDef['keys']);
// console.log(keypadDef['malgm']);
for (i = 0; i < 6; i++) {
pwdfix += keypadDef['malgm'].charAt(keypadDef['keys'][typedPwd.charAt(i).toUpperCase()]);
}
// console.log(pwdfix);
document.getElementById('password_temp').value=pwdfix;}}}