TOTP Help
We have a sweet tool for generating TOTP responses to secrets, which you can request like this:
GET Request
https://authenticationtest.com/totp/?secret=<totp-secret-here>
POST Request
POST over the field name "secret"
This will respond with a JSON string with the code:
{
"code": "043435",
"readme": "https:\/\/authenticationtest.com\/totp\/security\/"
}
You can use this for automating TOTP MFA requests. Pretty slick.
Read also:
TOTP Tool Security
Code Samples
Javascript XMLHttpRequest GET
var secret = "I65VU7K5ZQL7WB4E";
var formID = "totpmfa";
const http = new XMLHttpRequest();
http.open("GET","https://authenticationtest.com/totp/?secret="+secret);
http.send();
http.onreadystatechange=(e)=>{
var retVal = JSON.parse(http.responseText);
document.getElementById(formID).value = retVal.code;
}
Javascript XMLHttpRequest POST
var secret = "I65VU7K5ZQL7WB4E";
var formID = "totpmfa";
const http = new XMLHttpRequest();
http.open("POST","https://authenticationtest.com/totp/",true);
http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
http.send("secret="+secret);
http.onreadystatechange=(e)=>{
var retVal = JSON.parse(http.responseText);
document.getElementById(formID).value = retVal.code;
}
And remember kiddos
Tabs > Spaces