elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


  Mostrar Mensajes
Páginas: [1]
1  Seguridad Informática / WarZone / Re: Hack Web Serial en: 15 Marzo 2011, 20:25 pm
la verdad apenas empesado en esto y no entiendo mucho en la prueba de hack web serial de tanto leer en los foros lo unico que encontre fue este codigo pero la verdad es que nose que toca hacer pues me gustaria que alguien diera alguna pista o que texto tengo que leer


function ver (cod) {

if (cod.length != 16){
alert("Codigo No Valido");
return false;
}

var codx =new Array(cod);
var chk = '';
var tmp;
var cvs;
var cvd;

cvd = cod.substr(15,1);
cod = cod.substr(0,15);

 if (cod.length != 15 || IsNumeric(cod) == false){
 alert("Codigo No Valido");
 return false;
 }

 for (i=0;i<cod.length;i++){
   if (i%2 == 0){
   tmp = cod.substring(i,i+1) * 1;
   
   }
   else{
   tmp = cod.substring(i,i+1) * 2;
   }
   
  if (tmp >= 10){
  tmp = tmp.toString();
  tmp = tmp.substr(0,1) + tmp.substr(1,1);
  }
 
 chk = chk.concat(tmp);
 }

tmp = '';


for (i=0;i<chk.length;i++){
tmp = (tmp*1) + (chk.charAt(i)*1);
}


tmp = tmp.toString();
chk = (tmp.substr(0,1)*1) + (tmp.substr(1,1)*1);
chk = chk * 10;
chk = (chk*1) - (tmp*1);
cvs = chk % 10;

  if (cvs == cvd){
 
  return true;
  }
  else{
  alert("Codigo No Valido");
  return false;
  }
}


function IsNumeric(sText)

{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++)
      {
      Char = sText.charAt(i);
      if (ValidChars.indexOf(Char) == -1)
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }

Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines