服务热线:

18384080958

技术资讯
联系我们
联系人:冯先生
电 话:
手机:18384080958
邮箱:79007767@qq.com
地址:仪陇县河西工业集中区对面
网址:www.637641.com
您当前位置:首页 > 技术知识 > 正文技术知识
vb.encode解码器源码(asp)
添加时间:2016-03-21 来源:本站整理

<html><body>
<center>
<table cellpadding=3 bgcolor=#e7e7e7>
<tr>
<td bgcolor=#336699>
<div align=center><font color=#ffffff size=3><strong>vb.encode解码器</strong></font></div></td></tr>

<tr>
<td align=middle height=80>
< language=j>
var state_copy_input   = 100
var state_readlen   = 101
var state_decode   = 102
var state_unescape   = 103
var pick_encoding = new array(
   1, 2, 0, 1, 2, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 0,
   1, 0, 2, 0, 1, 1, 2, 0, 0, 2, 1, 0, 2, 0, 0, 2,
   1, 1, 0, 2, 0, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 2,
   1, 0, 2, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 0, 2
)
var rawdata = new array(
   0x64,0x37,0x69, 0x50,0x7e,0x2c, 0x22,0x5a,0x65, 0x4a,0x45,0x72,
   0x61,0x3a,0x5b, 0x5e,0x79,0x66, 0x5d,0x59,0x75, 0x5b,0x27,0x4c,
   0x42,0x76,0x45, 0x60,0x63,0x76, 0x23,0x62,0x2a, 0x65,0x4d,0x43,
   0x5f,0x51,0x33, 0x7e,0x53,0x42, 0x4f,0x52,0x20, 0x52,0x20,0x63,
   0x7a,0x26,0x4a, 0x21,0x54,0x5a, 0x46,0x71,0x38, 0x20,0x2b,0x79,
   0x26,0x66,0x32, 0x63,0x2a,0x57, 0x2a,0x58,0x6c, 0x76,0x7f,0x2b,
   0x47,0x7b,0x46, 0x25,0x30,0x52, 0x2c,0x31,0x4f, 0x29,0x6c,0x3d,
   0x69,0x49,0x70, 0x3f,0x3f,0x3f, 0x27,0x78,0x7b, 0x3f,0x3f,0x3f,
   0x67,0x5f,0x51, 0x3f,0x3f,0x3f, 0x62,0x29,0x7a, 0x41,0x24,0x7e,
   0x5a,0x2f,0x3b, 0x66,0x39,0x47, 0x32,0x33,0x41, 0x73,0x6f,0x77,
   0x4d,0x21,0x56, 0x43,0x75,0x5f, 0x71,0x28,0x26, 0x39,0x42,0x78,
   0x7c,0x46,0x6e, 0x53,0x4a,0x64, 0x48,0x5c,0x74, 0x31,0x48,0x67,
   0x72,0x36,0x7d, 0x6e,0x4b,0x68, 0x70,0x7d,0x35, 0x49,0x5d,0x22,
   0x3f,0x6a,0x55, 0x4b,0x50,0x3a, 0x6a,0x69,0x60, 0x2e,0x23,0x6a,
   0x7f,0x09,0x71, 0x28,0x70,0x6f, 0x35,0x65,0x49, 0x7d,0x74,0x5c,
   0x24,0x2c,0x5d, 0x2d,0x77,0x27, 0x54,0x44,0x59, 0x37,0x3f,0x25,
   0x7b,0x6d,0x7c, 0x3d,0x7c,0x23, 0x6c,0x43,0x6d, 0x34,0x38,0x28,
   0x6d,0x5e,0x31, 0x4e,0x5b,0x39, 0x2b,0x6e,0x7f, 0x30,0x57,0x36,
   0x6f,0x4c,0x54, 0x74,0x34,0x34, 0x6b,0x72,0x62, 0x4c,0x25,0x4e,
   0x33,0x56,0x30, 0x56,0x73,0x5e, 0x3a,0x68,0x73, 0x78,0x55,0x09,
   0x57,0x47,0x4b, 0x77,0x32,0x61, 0x3b,0x35,0x24, 0x44,0x2e,0x4d,
   0x2f,0x64,0x6b, 0x59,0x4f,0x44, 0x45,0x3b,0x21, 0x5c,0x2d,0x37,
   0x68,0x41,0x53, 0x36,0x61,0x58, 0x58,0x7a,0x48, 0x79,0x22,0x2e,
   0x09,0x60,0x50, 0x75,0x6b,0x2d, 0x38,0x4e,0x29, 0x55,0x3d,0x3f
)
var transformed = new array()
for (var i=0; i<3; i++) transformed[i] = new array()
for (var i=31; i<=126; i++) for (var j=0; j<3; j++) transformed[j][rawdata[(i-31) * 3 + j]] = (i==31) ? 9 : i

var digits = new array()
for (var i=0; i<26; i++)
{
   digits["a".charcodeat(0)+i] = i
   digits["a".charcodeat(0)+i] = i+26
}
for (var i=0; i<10; i++) digits["0".charcodeat(0)+i] = i+52
digits[0x2b] = 62
digits[0x2f] = 63
function unescape(char)
{
   var escapes = "#&!*$"
   var escaped = "\r\n<>@"
   if (char.charcodeat(0) > 126) return char
   if (escapes.indexof(char) != -1) return escaped.substr(escapes.indexof(char), 1)
   return "?"
}

function decodebase64(string)
{
   var val = 0
   val +=   (digits[string.substr(0,1).charcodeat(0)] << 2)
   val +=   (digits[string.substr(1,1).charcodeat(0)] >> 4)
   val +=   (digits[string.substr(1,1).charcodeat(0)] & 0xf) << 12
   val += ((digits[string.substr(2,1).charcodeat(0)] >> 2) << 8)
   val += ((digits[string.substr(2,1).charcodeat(0)] & 0x3) << 22)
   val +=   (digits[string.substr(3,1).charcodeat(0)] << 16)
   return val
}
function strdec(encodingstring)
{

   var marker = "#@~^"
   var stringindex = 0
   var index = -1
   var unencodingindex = 0
   var char = null
   var encodinglength = unencodinglength = 0
   var state = state_copy_input
   var unencodingstring = ""
   var re, arr

   while(state)
   {
    switch (state)
    {
     case (state_copy_input) :
      index = encodingstring.indexof(marker, stringindex)
      if (index != -1)
      {
       unencodingstring += encodingstring.substring(stringindex, index)
       index += marker.length
       state = state_readlen
      }
      else
      {
       stringindex = stringindex==0 ? 0 : stringindex
       unencodingstring += encodingstring.substr(stringindex, encodingstring.length)
       state = 0
      }
      break
   
     case (state_readlen) :
      encodinglength = encodingstring.substr(index, 6)
      unencodinglength = decodebase64(encodinglength)
      index += (6 + "==".length)
      state = state_decode
      break
    
     case (state_decode) :
      if (!unencodinglength)
      {
       stringindex = index + "dqgaaa==^#~@".length
       unencodingindex = 0
       state = state_copy_input
       break
      }
      char = encodingstring.substr(index, 1)
      if (char == "@") state = state_unescape
      else
      {
       if (char.charcodeat(0) < 0xff)
       {
        unencodingstring += string.fromcharcode(transformed[pick_encoding[unencodingindex%64]][char.charcodeat(0)])
        unencodingindex++
       }
       else
       {
        unencodingstring += char
       }     
       index++
       unencodinglength--
       break
      }
    
     case state_unescape:
      unencodingstring += unescape(encodingstring.substr(++index, 1))
      index++; unencodinglength -=2
      unencodingindex++
      state = state_decode
      break
    }
   }

   re   = new regexp("(j|vb).encode", "gmi")
   while(arr = re.exec(unencodingstring)) unencodingstring = regexp.leftcontext + regexp.$1 + regexp.rightcontext
   return unencodingstring
}

</>

<textarea id=encodehtml rows=20 cols=80></textarea> <br><br>
<div align=center><button onclick=encodehtml.innertext=strdec(encodehtml.innertext)>解密
</button></div></td></tr></table></td></tr></table></td></tr></table>
</body>
</html>

扫一扫,关注我们