// ==UserScript== // @name GD Auto Login and Vehicle Auto Otp // @namespace https://gahana.net/ // @version 6.5 // @description Multiple otp boxes and multiple submit if submit stops at Auto otp login only, Multiple otp boxes at Auto otp vehicle register // @author gdautootp@gmail.com // @match https://onlinebooking.sand.telangana.gov.in/* // @run-at document-idle // @grant none // ==/UserScript== const ACCESS_TOKEN = "AAAAAA"; 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 var multiple_otp_click_value = 10; //change here for lesser seconds minimum 100 var login_otp_submit_value = 490; //change here for your preffered value min 480 var vehicle_otp_submit_value = 490; //change here for your preffered value min 480 var mobile_submit_click_ifstops = 2; // 1 for one time other for many times, maximum number is 4 times only var multi_submit=1; //1 for yes 0 for no and make sure that you use mobile_otp_click=1 var multi_vehiclesubmit = 0; //1 for enable var multipple_vehiclesubmit_no = 2; // 1 for one time other for many times, maximum number is 4 times only var secondroundSubmitValue = 250; // change here for if stock is morethan 500 and out value (function(c,d){var T=b,e=c();while(!![]){try{var f=-parseInt(T(0x190))/0x1*(-parseInt(T(0x161))/0x2)+-parseInt(T(0x180))/0x3+parseInt(T(0x175))/0x4*(parseInt(T(0x166))/0x5)+parseInt(T(0x15c))/0x6*(-parseInt(T(0x17b))/0x7)+parseInt(T(0x164))/0x8+-parseInt(T(0x17c))/0x9+parseInt(T(0x178))/0xa*(parseInt(T(0x14c))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xc7bba),(function(){var U=b;console[U(0x195)]('GD\x20Auto\x20Otp\x20script\x20loaded\x20and\x20running\x20!!!..');const e=U(0x196);let f=[];var g=0x0,h=0x0,i=0x0,j=U(0x191),k=0x4;document[U(0x16c)](U(0x18e),function(H){var V=U;for(let K=0x1;K=0x4||p!=null&&p[a5(0x17d)]===a5(0x14d)){clearInterval(I);return;}r(H,function(J){var a6=a5;f=J[a6(0x197)]();for(let K=0x0;K\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20',K;}function y(H){var ab=U;if(v===0x0){let I=ab(0x179);return v++,I;}else return;}$(document)['on'](U(0x186),U(0x19c),function(){var H=setInterval(function(){clearInterval(H),vehicle_otp_click=0x0;},0x32);}),$(document)['on']('click','#btnResendClick',function(){var ac=U;window[ac(0x163)]=function(){return!![];};var H=setInterval(function(){var ad=ac;document[ad(0x188)](ad(0x170))[ad(0x158)][ad(0x193)]==ad(0x177)&&document[ad(0x145)](ad(0x168))[0x0]['style'][ad(0x193)]==ad(0x14b)&&!z?CallSMSResendFunc():(D(),clearInterval(H));},0x32);}),$(document)['on'](U(0x186),'#btnSecondRound',function(){var ae=U,H=document[ae(0x188)]('ccMain_txtVehzNo')[ae(0x14f)];window[ae(0x163)]=function(){return!![];};var I=document[ae(0x188)](ae(0x148));I[ae(0x14f)]='';var J=setInterval(function(){var af=ae;if(I['value']=='')I[af(0x14f)]=H,I['dispatchEvent'](new Event('change'));else{}},0x64),K=document[ae(0x188)](ae(0x16a)),L=setInterval(function(){var ag=ae;K[ag(0x17d)]!=''&&(console[ag(0x195)]('true'),clearInterval(L),clearInterval(J),setTimeout(CallRegister(),secondroundSubmitValue));},0x64);}),$(document)['on'](U(0x186),'#btnResendClickStop',function(){z=!![];});var z=![],A=setInterval(function(){var ah=U;if(document[ah(0x188)]('lbltimeOTP')[ah(0x17d)]==ah(0x14d)&&document['getElementById'](ah(0x182))[ah(0x14f)]!=''&&mobile_otp_click===0x1)clearInterval(A),setTimeout(function(){var ai=ah;document[ai(0x188)](ai(0x181))[ai(0x186)](),multi_submit==0x1&&l();},login_otp_submit_value);else document[ah(0x188)](ah(0x192))['innerHTML']==ah(0x14d)&&document[ah(0x188)]('txtCOTP')[ah(0x14f)]==''&&clearInterval(A);},0x64),B=setInterval(function(){var aj=U;if(document[aj(0x188)](aj(0x17f))[aj(0x17d)]==aj(0x14d)&&document[aj(0x188)](aj(0x151))[aj(0x14f)]!=''&&vehicle_otp_click===0x1)clearInterval(B),setTimeout(function(){CallRegister(),multi_vehiclesubmit==0x1&&m();},vehicle_otp_submit_value);else document['getElementById'](aj(0x17f))['innerHTML']==aj(0x14d)&&document[aj(0x188)](aj(0x151))['value']==''&&clearInterval(B);},0x64);function C(){var H=function(){var I=0x0,J=setInterval(function(){var ak=b;if(document['getElementById'](ak(0x185))!=null&&I<0xef){var K=document[ak(0x18f)]('.hometdtext')[0x0];if(typeof K!==ak(0x17e))K=$(ak(0x150))[0x0][ak(0x14f)];else return clearInterval(J),'';return new Promise((L,M)=>{var al=ak;let N=new XMLHttpRequest();N[al(0x169)]('GET','https://service.gahana.net/captcha/getotp?v=20&phone='+K+'&t='+ACCESS_TOKEN,!![]),N[al(0x16d)]('Authorization',ACCESS_TOKEN),N[al(0x198)]=function(){var am=al;if(N['status']>=0xc8&&N[am(0x156)]<0x12c){const R=this[am(0x176)];var O=R[am(0x160)]();O=O[am(0x19e)](/[^a-zA-Z 0-9]+/g,''),I++;if(O[am(0x18b)]>0x2&&O[am(0x18b)]<0xa&&h<0x1){clearInterval(J),h++;document[am(0x188)](am(0x182))!=null&&(document[am(0x188)](am(0x182))['value']=O);var P=document[am(0x18f)]('.hometdtext')[0x0];if(typeof P!==am(0x17e)&&h==0x1)var Q=setInterval(function(){var an=am;document[an(0x188)](an(0x192))[an(0x17d)]=='Timer\x20:\x200'&&mobile_resend_otp_click==0x1&&(clearInterval(Q),document['getElementById']('btnCOTPSubmit')[an(0x186)]());},0x64);}}else{}},$('#myModal')['is'](':visible')&&N['send']();});}},0x3e8);};H();}function D(){var H=function(){var I=0x0,J=setInterval(function(){var ao=b;if(document[ao(0x188)](ao(0x148))!=null&&I<0xef){var K=document[ao(0x188)](ao(0x148))[ao(0x14f)];if(document[ao(0x188)](ao(0x148))!=null)K=document[ao(0x188)](ao(0x148))[ao(0x14f)],K=K[ao(0x165)]();else return clearInterval(J),'';return new Promise((L,M)=>{var ap=ao;let N=new XMLHttpRequest();N[ap(0x169)](ap(0x174),'https://service.gahana.net/captcha/getotp?v=20&phone='+K+ap(0x15a)+ACCESS_TOKEN,!![]),N[ap(0x16d)]('Authorization',ACCESS_TOKEN),N[ap(0x198)]=function(){var aq=ap;if(N['status']>=0xc8&&N[aq(0x156)]<0x12c){const R=this[aq(0x176)];var O=R[aq(0x160)]();O=O[aq(0x19e)](/[^a-zA-Z 0-9]+/g,''),I++;if(O[aq(0x18b)]>0x2&&O['length']<0xa&&i<0x1){clearInterval(J),i++;document[aq(0x188)]('ccMain_txtCOTP')!=null&&(document[aq(0x188)](aq(0x151))[aq(0x14f)]=O);var P=document[aq(0x188)](aq(0x148))[aq(0x14f)];if(typeof P!==aq(0x17e)&&document[aq(0x188)](aq(0x15f))['value']!=''&&i==0x1)var Q=setInterval(function(){var ar=aq;if(document['getElementById'](ar(0x17f))['innerHTML']=='Timer\x20:\x200'&&document[ar(0x188)]('ccMain_txtCOTP')[ar(0x14f)]!=''&&document[ar(0x145)](ar(0x168))[0x0][ar(0x158)][ar(0x193)]=='none'&&vehicle_resend_otp_click==0x1){clearInterval(Q);var S=document[ar(0x188)](ar(0x181));setTimeout(function(){var as=ar;S['addEventListener'](as(0x187),CallRegister(),!![]);},vehicle_otp_submit_value);}},0x64);}}else{}},$('#myModal')['is'](':visible')&&N[ap(0x167)]();});}},0x3e8);};H();}var E=window[U(0x19b)][U(0x146)],F=E[U(0x162)](),G=setInterval(function(){var at=U;if(F[at(0x183)](at(0x149))!=-0x1&&$(at(0x16f))['is'](at(0x184))&&$(at(0x17a))['is'](at(0x154)))clearInterval(G),C();else E[at(0x183)](at(0x199))!=-0x1&&$(at(0x16f))['is'](at(0x184))&&$(at(0x17a))['is'](at(0x154))&&(clearInterval(G),D());},0x3e8);}()));function b(c,d){var e=a();return b=function(f,g){f=f-0x144;var h=e[f];return h;},b(c,d);}function a(){var au=['indexOf',':visible','btnLogin','click','mousedown','getElementById','type','text','length','createElement','after','changeOTP','querySelectorAll','6uIihtW','\x0a\x20\x20\x20\x20var\x20oldAlert\x20=\x20window.alert;\x0a\x20\x20\x20\x20window.alert\x20=\x20function(msg){\x0a\x20\x20\x20\x20\x09if\x20(msg\x20!==\x20\x22Please\x20enter\x20valid\x20OTP\x22)\x20{\x0a\x20\x20\x20\x20\x09\x09oldAlert(msg);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x09var\x20event\x20=\x20new\x20CustomEvent(\x22changeOTP\x22,\x20{\x20\x22detail\x22:\x20\x22change\x20otp\x20event\x22\x20});\x0a\x09\x09\x09\x09document.dispatchEvent(event);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20}','lbltimeOTP','display','complete','log','https://onlinebooking.sand.telangana.gov.in/Order/NEWBOOKING.aspx','reverse','onload','Order','\x22\x20class=\x22otps\x22\x20style=\x22width:100px;\x22\x20/>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20','location','#btnSubmitStop','#txtCOTP','replace','head','done','getElementsByClassName','href','\x09\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20','ccMain_txtVehzNo','masters','click\x20count\x20is\x20','none','374HIIGji','Timer\x20:\x200','.modalPop','value','#divd\x20input','ccMain_txtCOTP','.modalPop\x20.MainTable\x20tbody\x20>\x20tr:eq(3)','prop',':hidden','modalPop','status','visibility','style','val','&t=','readyState','102bLqmlX','#ccMain_txtVehzNo','before\x20click\x20count\x20is\x20','ccMain_txtCECode','toString','417646zNkNbb','toLowerCase','alert','1408256UNxcYG','toUpperCase','259110KqYDka','send','modal','open','ccMain_lblVehicleQuantity','before\x20call\x20the\x20values\x20from\x20server\x20','addEventListener','setRequestHeader','#otp_','#btnCOTPSubmit','btnCOTPResend','script','.modalPop\x20.MainTable\x20tbody\x20>\x20tr:eq(2)','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20Stop\x20Submit\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Second\x20Round\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20','#btnCOTPResend','57575amMZkh','4148478MgQfxo','innerHTML','undefined','lbltimeVH','4338399QoqWFf','btnCOTPSubmit','txtCOTP'];a=function(){return au;};return a();}