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",
"version": "0.1.6",
"version": "0.1.4",
"description": "Bypass BoilerKey.",
"options_page": "options.html",
"permissions": [
"https://api-1b9bef70.duosecurity.com/",
"storage"
],
"host_permissions": [
"https://api-1b9bef70.duosecurity.com/"
],
"content_scripts": [
{
"matches": ["https://www.purdue.edu/apps/account/cas/login*", "https://purdue.edu/apps/account/cas/login*"],
"js": ["HOTP.js", "casLoginInjection.js"]
}
],
"manifest_version": 3
"manifest_version": 2
}

View File

@ -6,16 +6,16 @@
<body>
<h2>Settings</h2>
<form id="settings" method="post">
Purdue Login:<br>
<input type="text" name="alias" placeholder="pete123">@purdue.edu<br>
BoilerKey PIN:<br>
<input type="password" 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>
<input type="text" name="activationCode" placeholder="LoR3mIP5um"><br>
HOTP Secret:<br>
<input type="text" name="key" placeholder="Leave it blank" disabled><br>
HOTP Counter:<br>
<input type="text" name="counter" placeholder="Leave it blank" disabled><br><br>
<label for="fname">Purdue Login: </label><br>
<input type="text" id="alias" name="alias" placeholder="pete123">@purdue.edu<br>
<label for="lname">BoilerKey PIN:</label><br>
<input type="password" id="pin" name="pin" placeholder="1234"><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" id="activationCode" name="activationCode" placeholder="LoR3mIP5um"><br>
<label for="lname">HOTP Secret:</label><br>
<input type="text" id="key" name="key" placeholder="Leave it blank" disabled><br>
<label for="lname">HOTP Counter:</label><br>
<input type="text" id="counter" name="counter" placeholder="Leave it blank" disabled><br><br>
<input type="submit" value="submit">
</form>
<br><hr>

View File

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