Ver Mensaje Individual
  #3  
Antiguo 28-01-2016
Avatar de FideRosado
FideRosado FideRosado is offline
Miembro
 
Registrado: jun 2010
Ubicación: Pinar del Rio Cuba
Posts: 146
Reputación: 14
FideRosado Va por buen camino
respuesta

Asie es, muchos no se dan uante porke pasa muy rapido, luego te envia a una web que te muestra otro form pero con mas dattos oultos, miren aca.

Código PHP:
ESTOS SON LOS VALORES NECESARIOS DEL FORMULARIO los limpie un poco de todo su estilo html pero es lo mismo.

<
form class="form" action="https://login.nauta.cu:8443//LoginServlet" method="post" id="formulario">
<
input type="hidden" name="wlanuserip" id="wlanuserip" value="100.68.33.178"/>
<
input type="hidden" name="wlanacname" id="wlanacname" value=""/>
<
input type="hidden" name="wlanmac" id="wlanmac" value="" />
<
input type="hidden" name="firsturl" id="firsturl" value="notFound.jsp" />
<
input type="hidden" name="ssid" id="ssid" value="" />
<
input type="hidden" name="usertype" id="usertype" value="1" />
<
input type="hidden" name="gotopage" id="gotopage" value="/nauta_etecsa/LoginURL/pc_login.jsp" />
<
input type="hidden" name="successpage" id="successpage" value="/nauta_etecsa/OnlineURL/pc_index.jsp" />
<
input type="hidden" name="loggerId" id="loggerId" value="20160126173347869" />
<
input type="hidden" name="lang" id="lang" value="es_ES" />
<
input type="text"   name="username" id="username" maxlength="253" class="input_text cred" >
<
input type="password" name="password" id="password" class="input_text cred" value="">
<
input type='hidden' name='CSRFToken_HW' value='e6b45eb31911c24279cf1f1d20d68917' />

CHEKEANDO EL LOGIN
<input class="btn" name="Enviar" value='Aceptar' type="button" onclick="checkLogin();">
</
form>

FUNCIONES PARA  DE LOGIN

function sendUserInfoForm(){
    var 
url '/EtecsaQueryServlet';
    var 
= $$("username");
    var 
= $$("password");
    if (
== null || b.value == "") {
        
alert(JSLocale.username_null);
        
b.focus();
        return 
false;
    }
    if (
== null || a.value == "") {
        
alert(JSLocale.pwd_null);
        
a.focus();
        return 
false;
    }
    $(
'#formulario').attr('action'url);
    $(
'#formulario').submit();
}

FUNCIONES EXTERNAS

var JSLocale =
{
    
username_null "Por favor introduce tu usuario",
    
pwd_null "Por favor introduce tu contraseña",
    
verifycode_null "Por favor introduce el código de verificación",
    
varify_wrong "Los caracteres introducidos no coinciden con la imagen",
    
end "" // end sign,no meaning
}


function $$(
a) {
    return 
document.getElementById(a);
}
function 
checkLogin() 
{
    var 
= $$("username");
    var 
= $$("password");
    var 
d=$$("validate");
    if (
== null || b.value == ""
    {
        
alert(JSLocale.username_null);
        
b.focus();
        return 
false;
    }
    if (
== null || a.value == ""
    {
        
alert(JSLocale.pwd_null);
        
a.focus();
        return 
false;
    }
    if(
d!=null)
    {
        if(
d.value=="")
        {
            
alert(JSLocale.verifycode_null);
            
d.focus();
            return 
false
        
}
        else
        {
            var 
c=d.value;
            
DWREngine.setAsync(true);
            
VerifyCode.checkJS(c,check_callback)
        }
    }
    $$(
"formulario").submit();
}
function 
switchLang(b) {
    
document.getElementById("lang").value=b;
    
document.getElementById("currentURL").value=currentURL;
    var 
changelang document.getElementById("changelang");
    
changelang.action "/changelang.do";
    
changelang.submit();
}
function 
RefreshImage(validate)
{
    var 
el = $$(validate+"img");
    
el.src '/verifycode?' Math.random(); //[false alarm:Insecure Randomness]
    
$$("validate").value="";
}

function 
check_callback(a)
{
    if(
0>a)
    {
        
alert(JSLocale.varify_wrong);
        $$(
"validate").value="";
        
RefreshImage("validate0");
        $$(
"validate").focus();
    return 
false
    
}
    else
    {
        $$(
"formulario").submit()
        return 
true
    
}

__________________
"Aquellos que dicen que algo no puede hacerse, suelen ser interrumpidos por otros que lo están haciendo"
Responder Con Cita