Compare commits

..

No commits in common. "master" and "0.1.4" have entirely different histories.

3 changed files with 25 additions and 28 deletions

View File

@ -1,19 +1,17 @@
{ {
"name": "Boiler AutoLogin", "name": "Boiler AutoLogin",
"version": "0.1.6", "version": "0.1.4",
"description": "Bypass BoilerKey.", "description": "Bypass BoilerKey.",
"options_page": "options.html", "options_page": "options.html",
"permissions": [ "permissions": [
"https://api-1b9bef70.duosecurity.com/",
"storage" "storage"
], ],
"host_permissions": [
"https://api-1b9bef70.duosecurity.com/"
],
"content_scripts": [ "content_scripts": [
{ {
"matches": ["https://www.purdue.edu/apps/account/cas/login*", "https://purdue.edu/apps/account/cas/login*"], "matches": ["https://www.purdue.edu/apps/account/cas/login*", "https://purdue.edu/apps/account/cas/login*"],
"js": ["HOTP.js", "casLoginInjection.js"] "js": ["HOTP.js", "casLoginInjection.js"]
} }
], ],
"manifest_version": 3 "manifest_version": 2
} }

View File

@ -6,16 +6,16 @@
<body> <body>
<h2>Settings</h2> <h2>Settings</h2>
<form id="settings" method="post"> <form id="settings" method="post">
Purdue Login:<br> <label for="fname">Purdue Login: </label><br>
<input type="text" name="alias" placeholder="pete123">@purdue.edu<br> <input type="text" id="alias" name="alias" placeholder="pete123">@purdue.edu<br>
BoilerKey PIN:<br> <label for="lname">BoilerKey PIN:</label><br>
<input type="password" name="pin" placeholder="1234"><br> <input type="password" id="pin" name="pin" placeholder="1234"><br>
Duo Mobile Activation Code: (e.g. if your Duo Activation URL is https://m-1b9bef70.duosecurity.com/activate/<strong>LoR3mIP5um</strong>, then the code will be <strong>LoR3mIP5um</strong>).<br> <label for="lname">Duo Mobile Activation Code: (e.g. if your Duo Activation URL is https://m-1b9bef70.duosecurity.com/activate/<strong>LoR3mIP5um</strong>, then the code will be <strong>LoR3mIP5um</strong>).</label><br>
<input type="text" name="activationCode" placeholder="LoR3mIP5um"><br> <input type="text" id="activationCode" name="activationCode" placeholder="LoR3mIP5um"><br>
HOTP Secret:<br> <label for="lname">HOTP Secret:</label><br>
<input type="text" name="key" placeholder="Leave it blank" disabled><br> <input type="text" id="key" name="key" placeholder="Leave it blank" disabled><br>
HOTP Counter:<br> <label for="lname">HOTP Counter:</label><br>
<input type="text" name="counter" placeholder="Leave it blank" disabled><br><br> <input type="text" id="counter" name="counter" placeholder="Leave it blank" disabled><br><br>
<input type="submit" value="submit"> <input type="submit" value="submit">
</form> </form>
<br><hr> <br><hr>

View File

@ -1,26 +1,25 @@
window.onload=function(){ window.onload=function(){
var activationCode; var activationCode;
var $ = function(name) { return document.getElementsByName(name)[0]; };
var form = document.getElementById('settings'); var form = document.getElementById('settings');
form.addEventListener("submit", processForm); form.addEventListener("submit", processForm);
chrome.storage.sync.get(["alias", "pin", "activationCode", "key", "counter"], function(result) { chrome.storage.sync.get(["alias", "pin", "activationCode", "key", "counter"], function(result) {
if(result.alias) $("alias").value = result.alias; if(result.alias) document.getElementById("alias").value = result.alias;
if(result.pin) $("pin").value = result.pin; if(result.pin) document.getElementById("pin").value = result.pin;
if(result.activationCode) $("activationCode").value = activationCode = result.activationCode; if(result.activationCode) document.getElementById("activationCode").value = activationCode = result.activationCode;
if(result.key) $("key").value = result.key; if(result.key) document.getElementById("key").value = result.key;
if(result.counter) $("counter").value = result.counter; if(result.counter) document.getElementById("counter").value = result.counter;
}); });
function processForm(e) { function processForm(e) {
e.preventDefault(); e.preventDefault();
chrome.storage.sync.set({ "alias": $("alias").value, chrome.storage.sync.set({ "alias": document.getElementById("alias").value,
"pin": $("pin").value, "pin": document.getElementById("pin").value,
"activationCode": $("activationCode").value, "activationCode": document.getElementById("activationCode").value,
"key": $("key").value, "key": document.getElementById("key").value,
"counter": $("counter").value "counter": document.getElementById("counter").value
}, function() { }, function() {
if(activationCode != $("activationCode").value){ if(activationCode != document.getElementById("activationCode").value){
activateDuoMobile($("activationCode").value); activateDuoMobile(document.getElementById("activationCode").value);
}else{ }else{
alert("SAVED!"); alert("SAVED!");
} }