Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function validatekey()
  2. {
  3.     e = false;
  4.     var _strKey = "";
  5.     try {
  6.         _strKey = document.getElementById("key").value;
  7.         var a = _strKey.split("-");
  8.        
  9.         if(a.length !== 5)
  10.             e = true;
  11.        
  12.         var o=a.map(genFunc).reduceRight(callback, new (genFunc(a[4]))(Function));
  13.         if(!equal(o,ref))
  14.             e = true;
  15.        
  16.     }catch(e){
  17.         e = true;
  18.     }
  19.  
  20.     if(!e) {
  21.         if(document.location.href.indexOf("?p=") == -1) {
  22.             document.location = document.location.href + "?p=" + _strKey;
  23.            
  24.         }
  25.     } else {
  26.         $("#cresponse").html("<div class='alert alert-danger'>Wrong password sorry.</div>");
  27.     }  
  28. }
  29.  
  30. function genFunc(_part) {
  31.     if(!_part || !(_part.length) || _part.length !== 4)
  32.         return function() {};
  33.  
  34.     return new Function(_part.substring(1,3), "this." + _part[3] + "=" + _part.slice(1,3) + "+" + (fn(function(y){return y<=57})(_part.charCodeAt(0)) ?  _part[0] : "'"+ _part[0] + "'"));
  35. }
  36.  
  37. function callback(x,y,i,a) {
  38.   return !y.call(x, a[a["length"]-1-i].toString().slice(19,21)) ? x : {};
  39. }
  40. var ref = ({T:"BG8", J:"jep", j:"M2L", K:"L23", H:"r1A"});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement