TSMDC Auto OTP Diotp original script
// ==UserScript==
// @name _____AUTO OTP 4.56.DIO
// @namespace auto
// @version 1.2
// @description Auto otp login, Auto otp vehicle register
// @author diotp@yandex.com
// @match https://onlinebooking.sand.telangana.gov.in/Masters/Home.aspx
// @match https://onlinebooking.sand.telangana.gov.in/MASTERS/HOME.ASPX
// @match https://onlinebooking.sand.telangana.gov.in/Order/NEWBOOKING.aspx?KLM=*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
var token = "QQQQQ";
var a = 0; //no change
var b = 0; //no change
var c = 0; //no change
var mobile_otp_click = 1; //login submit click=1, no click =0
var vehicle_otp_click = 1; //vehicle submit click=1, no click =0
var mobile_resend_otp_click = 1; //login resend otp submit click=1, no click =0
var vehicle_resend_otp_click = 1; //vehicle resend otp submit click=1, no click =0
function l_resend_otp() {
var timer = function() {
var _0x55850b = 0;
var interval = setInterval(function() {
if (document.getElementById('btnLogin') != null && _0x55850b < 0xef) {
var phone = document.querySelectorAll('.hometdtext')[0];
if (typeof phone !== "undefined") {
phone = $("#divd input")[0].value;
} else {
clearInterval(interval);
return "";
}
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
xhr.open('GET', atob('aHR0cHM6Ly9ud2RyY2E0NG5lLmV4ZWN1dGUtYXBpLmFwLXNvdXRoLTEuYW1hem9uYXdzLmNvbS9wcm9kL3JlcXVlc3Qy') + '?phone=' + phone + '&t=' + token, true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onload = function() {
if (xhr.status >= 200 && xhr.status < 300) {
var otp = this.response;
otp = otp.replace(/"/g, "");
_0x55850b++;
if (otp.length > 2 && otp.length < 10 && b < 1) {
clearInterval(interval);
b++;
if (document.getElementById('txtCOTP') != null) {
document.getElementById('txtCOTP').value = otp;
}
var phone = document.querySelectorAll('.hometdtext')[0];
if (typeof phone !== "undefined" && b == 1) {
var timer = setInterval(function() {
if (document.getElementById("lbltimeOTP").innerHTML == "Timer : 0" && mobile_resend_otp_click==1) {
clearInterval(timer);
document.getElementById('btnCOTPSubmit').click();
}
}, 0x64);
}
}
} else {}
}
if ($('#myModal').is(':visible')) {
xhr.send();
}
});
}
}, 0x3e8);
};
timer();
}
function v_resend_otp() {
var timer = function() {
var _0x55850c = 0;
var interval = setInterval(function() {
if (document.getElementById('ccMain_txtVehzNo') != null && _0x55850c < 0xef) {
var phone = document.getElementById('ccMain_txtVehzNo').value;
if (document.getElementById('ccMain_txtVehzNo') != null) {
phone = document.getElementById('ccMain_txtVehzNo').value;
phone = phone.toUpperCase();
} else {
clearInterval(interval);
return "";
}
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
xhr.open('GET', atob('aHR0cHM6Ly9ud2RyY2E0NG5lLmV4ZWN1dGUtYXBpLmFwLXNvdXRoLTEuYW1hem9uYXdzLmNvbS9wcm9kL3JlcXVlc3Qy') + '?phone=' + phone + '&t=' + token, true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onload = function() {
if (xhr.status >= 200 && xhr.status < 300) {
var otp = this.response;
otp = otp.replace(/"/g, "");
_0x55850c++;
if (otp.length > 2 && otp.length < 10 && c < 1) {
clearInterval(interval);
c++;
if (document.getElementById('ccMain_txtCOTP') != null) {
document.getElementById('ccMain_txtCOTP').value = otp;
}
var phone = document.getElementById('ccMain_txtVehzNo').value;
if (typeof phone !== "undefined" && document.getElementById('ccMain_txtCECode').value != '' && c == 1) {
var timer2 = setInterval(function() {
if (document.getElementById("lbltimeVH").innerHTML == "Timer : 0" && document.getElementById("ccMain_txtCOTP").value != "" && document.getElementsByClassName("modal")[0].style.display == "none" && vehicle_resend_otp_click==1) {
clearInterval(timer2);
var t = document.getElementById('btnCOTPSubmit');
t.addEventListener("mousedown", CallRegister(), true);
}
}, 0x64);
}
}
} else {}
}
if ($('#myModal').is(':visible')) {
xhr.send();
}
});
}
}, 0x3e8);
};
timer();
}
function auto_otp() {
var timer = function() {
var _0x55850a = 0;
var interval = setInterval(function() {
if ((document.getElementById('btnLogin') != null || document.getElementById('ccMain_txtVehzNo') != null) && _0x55850a < 0xef) {
var phone = document.querySelectorAll('.hometdtext')[0];
if (typeof phone !== "undefined") {
phone = $("#divd input")[0].value;
} else if (document.getElementById('ccMain_txtVehzNo') != null) {
phone = document.getElementById('ccMain_txtVehzNo').value;
phone = phone.toUpperCase();
} else {
clearInterval(interval);
return "";
}
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
xhr.open('GET', atob('aHR0cHM6Ly9ud2RyY2E0NG5lLmV4ZWN1dGUtYXBpLmFwLXNvdXRoLTEuYW1hem9uYXdzLmNvbS9wcm9kL3JlcXVlc3Qy') + '?phone=' + phone + '&t=' + token, true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onload = function() {
if (xhr.status >= 200 && xhr.status < 300) {
var otp = this.response;
otp = otp.replace(/"/g, "");
_0x55850a++;
if (otp.length > 2 && otp.length < 10 && a < 1) {
clearInterval(interval);
a++;
if (document.getElementById('txtCOTP') != null) {
document.getElementById('txtCOTP').value = otp;
} else {
document.getElementById('ccMain_txtCOTP').value = otp;
}
var phone = document.querySelectorAll('.hometdtext')[0];
if (typeof phone !== "undefined" && document.getElementById('txtEnterCode').value != '' && a == 1) {
var timer = setInterval(function() {
if (document.getElementById("lbltimeOTP").innerHTML == "Timer : 0" && document.getElementById("txtCOTP").value != "" && mobile_otp_click==1) {
clearInterval(timer);
setTimeout(function() {
document.getElementById('btnCOTPSubmit').click();
}, 500);
}
}, 0x64);
} else {
var timer2 = setInterval(function() {
if (document.getElementById("lbltimeVH").innerHTML == "Timer : 0" && document.getElementById("ccMain_txtCOTP").value != "" && a == 1 && vehicle_otp_click==1) {
clearInterval(timer2);
var t = document.getElementById('btnCOTPSubmit');
setTimeout(function() {
t.addEventListener("mousedown", CallRegister(), true);
}, 700);
}
}, 0x64)
}
}
} else {}
}
if ($('#myModal').is(':visible')) {
xhr.send();
}
});
}
}, 0x3e8);
};
timer();
}
setTimeout(auto_otp, 0x3e8);
var oldUrl = window.location.href;
var newUrl = oldUrl.toLowerCase();
if(newUrl.indexOf("masters") != -1 ){
document.getElementById('txtCOTP').removeAttribute('type');
}
else{
document.getElementById('ccMain_txtCOTP').removeAttribute('type');
}
var sec_otp = setInterval(function() {
if (newUrl.indexOf("masters") != -1 && $("#btnCOTPSubmit").is(':visible') && $("#btnCOTPResend").is(':hidden')) {
clearInterval(sec_otp);
l_resend_otp();
}
else if(oldUrl.indexOf("Order") != -1 && $("#btnCOTPSubmit").is(':visible') && $("#btnCOTPResend").is(':hidden')){
clearInterval(sec_otp);
v_resend_otp();
}
}, 1000);
})();
Need licence
ReplyDelete