教你如何解密js/vbs/vbscript加密的编码异处理小结

js/vbs/vbscript加密代码:

<body style="font:12px">
<fieldset>
<legend align="center">源码变异处理 </legend>
<table>
<tr valign=top>
<td><br>
<button onclick=encJSHTM()> JS 网页加密 </button><br>
<button onclick=encVBSHTM()> VBS网页加密 </button><br>
<button onclick=encVBS()> VB 脚本加密 </button><br>
<br><p style="font:12px">
说明:<br><br>
将需要加密的内容<br>复制到框里,<br>点相应的按钮,<br>就可以完成操作<br><br>
如出现运行错误,<br>请重新刷新后生成!</p>
</td>
<td>
<textarea id=txt cols=100% rows=20></textarea>
</td>
</table>
<script language=vbscript>

function change(k)
s=""
for i = 1 to Len(k)
s=s&ascw(mid(k,i,1))&","
next
change=left(s,len(s)-1)
end function

Sub encVBS()
s="function rechange(k)"+vbcrlf+"s=Split(k,"","")"+vbcrlf+"t="""""+vbcrlf+"For i = 0 To UBound(s)"+vbcrlf+"t=t+Chrw(eval(s(i)))"+vbcrlf+"Next"+vbcrlf+"rechange=t"+vbcrlf+"End Function"+vbcrlf+"t="""+change(Document.all.txt.value)+""""+vbcrlf+"execute(rechange(t))"
Document.all.txt.value=s
End sub

Sub nencJSHTM()
s="<script>"+vbcrlf+"t="""+change(Document.all.txt.value)+""""+vbcrlf+"t=eval(""String.fromCharCode(""+t+"")"");"+vbscrlf+"document.write(t);</"+"script>"
Document.all.txt.value=s

End Sub

Sub encVBSHTM()
s="<script language=vbscript>"+vbcrlf+"function rechange(k)"+vbcrlf+"s=Split(k,"","")"+vbcrlf+"t="""""+vbcrlf+"For i = 0 To UBound(s)"+vbcrlf+"t=t+Chrw(eval(s(i)))"+vbcrlf+"Next"+vbcrlf+"rechange=t"+vbcrlf+"End Function"+vbcrlf+"t="""+change(Document.all.txt.value)+""""+vbcrlf+"document.write rechange(t)"+vbcrlf+"</scri"+"pt>"
Document.all.txt.value=s
End sub
</script>
<script language=javascript>
function encJSHTM()
{
var k = new String;
var s = new String;
k=document.all.txt.value
for (i=0;i<k.length ;i++ )
{
s+=k.charCodeAt(i);
if (i!=k.length-1)
{
s+=",";
}
}
s="<script>\nt=\""+s+"\"\nt=eval(\"String.fromCharCode(\"+t+\")\");\ndocument.write(t);</"+"script>";
document.all.txt.value=s;
}
</script>
</fieldset>

第二步我们做个测试用js加密上面的代码,加密效果如下:

<script>
t="60,98,111,100,121,32,115,116,121,108,101,61,34,102,111,110,116,58,49,50,112,120,34,62,13,10,60,102,105,101,108,100,115,101,116,62,13,10,60,108,101,103,101,110,100,32,97,108,105,103,110,61,34,99,101,110,116,101,114,34,62,28304,30721,21464,24322,22788,29702,32,60,47,108,101,103,101,110,100,62,13,10,60,116,97,98,108,101,62,13,10,60,116,114,32,118,97,108,105,103,110,61,116,111,112,62,13,10,60,116,100,62,60,98,114,62,13,10,60,98,117,116,116,111,110,32,111,110,99,108,105,99,107,61,101,110,99,74,83,72,84,77,40,41,62,32,74,83,32,32593,39029,21152,23494,32,60,47,98,117,116,116,111,110,62,60,98,114,62,13,10,60,98,117,116,116,111,110,32,111,110,99,108,105,99,107,61,101,110,99,86,66,83,72,84,77,40,41,62,32,86,66,83,32593,39029,21152,23494,32,60,47,98,117,116,116,111,110,62,60,98,114,62,13,10,60,98,117,116,116,111,110,32,111,110,99,108,105,99,107,61,101,110,99,86,66,83,40,41,62,32,86,66,32,33050,26412,21152,23494,32,60,47,98,117,116,116,111,110,62,60,98,114,62,13,10,60,98,114,62,60,112,32,115,116,121,108,101,61,34,102,111,110,116,58,49,50,112,120,34,62,13,10,35828,26126,58,60,98,114,62,60,98,114,62,13,10,23558,38656,35201,21152,23494,30340,20869,23481,60,98,114,62,22797,21046,21040,26694,37324,65292,60,98,114,62,28857,30456,24212,30340,25353,38062,65292,60,98,114,62,23601,21487,20197,23436,25104,25805,20316,60,98,114,62,60,98,114,62,13,10,22914,20986,29616,36816,34892,38169,35823,65292,60,98,114,62,35831,37325,26032,21047,26032,21518,29983,25104,65281,60,47,112,62,13,10,60,47,116,100,62,13,10,60,116,100,62,13,10,60,116,101,120,116,97,114,101,97,32,105,100,61,116,120,116,32,99,111,108,115,61,49,48,48,37,32,114,111,119,115,61,50,48,62,60,47,116,101,120,116,97,114,101,97,62,13,10,60,47,116,100,62,13,10,60,47,116,97,98,108,101,62,13,10,60,115,99,114,105,112,116,32,108,97,110,103,117,97,103,101,61,118,98,115,99,114,105,112,116,62,13,10,13,10,102,117,110,99,116,105,111,110,32,99,104,97,110,103,101,40,107,41,13,10,32,115,61,34,34,13,10,32,102,111,114,32,105,32,61,32,49,32,116,111,32,76,101,110,40,107,41,13,10,32,32,115,61,115,38,97,115,99,119,40,109,105,100,40,107,44,105,44,49,41,41,38,34,44,34,13,10,32,110,101,120,116,13,10,32,99,104,97,110,103,101,61,108,101,102,116,40,115,44,108,101,110,40,115,41,45,49,41,13,10,101,110,100,32,102,117,110,99,116,105,111,110,13,10,13,10,83,117,98,32,101,110,99,86,66,83,40,41,13,10,32,115,61,34,102,117,110,99,116,105,111,110,32,114,101,99,104,97,110,103,101,40,107,41,34,43,118,98,99,114,108,102,43,34,115,61,83,112,108,105,116,40,107,44,34,34,44,34,34,41,34,43,118,98,99,114,108,102,43,34,116,61,34,34,34,34,34,43,118,98,99,114,108,102,43,34,70,111,114,32,105,32,61,32,48,32,84,111,32,85,66,111,117,110,100,40,115,41,34,43,118,98,99,114,108,102,43,34,116,61,116,43,67,104,114,119,40,101,118,97,108,40,115,40,105,41,41,41,34,43,118,98,99,114,108,102,43,34,78,101,120,116,34,43,118,98,99,114,108,102,43,34,114,101,99,104,97,110,103,101,61,116,34,43,118,98,99,114,108,102,43,34,69,110,100,32,70,117,110,99,116,105,111,110,34,43,118,98,99,114,108,102,43,34,116,61,34,34,34,43,99,104,97,110,103,101,40,68,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,41,43,34,34,34,34,43,118,98,99,114,108,102,43,34,101,120,101,99,117,116,101,40,114,101,99,104,97,110,103,101,40,116,41,41,34,13,10,32,68,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,61,115,13,10,69,110,100,32,115,117,98,13,10,13,10,83,117,98,32,110,101,110,99,74,83,72,84,77,40,41,13,10,32,115,61,34,60,115,99,114,105,112,116,62,34,43,118,98,99,114,108,102,43,34,116,61,34,34,34,43,99,104,97,110,103,101,40,68,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,41,43,34,34,34,34,43,118,98,99,114,108,102,43,34,116,61,101,118,97,108,40,34,34,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,34,34,43,116,43,34,34,41,34,34,41,59,34,43,118,98,115,99,114,108,102,43,34,100,111,99,117,109,101,110,116,46,119,114,105,116,101,40,116,41,59,60,47,34,43,34,115,99,114,105,112,116,62,34,13,10,32,68,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,61,115,13,10,13,10,69,110,100,32,83,117,98,13,10,13,10,83,117,98,32,101,110,99,86,66,83,72,84,77,40,41,13,10,32,115,61,34,60,115,99,114,105,112,116,32,108,97,110,103,117,97,103,101,61,118,98,115,99,114,105,112,116,62,34,43,118,98,99,114,108,102,43,34,102,117,110,99,116,105,111,110,32,114,101,99,104,97,110,103,101,40,107,41,34,43,118,98,99,114,108,102,43,34,115,61,83,112,108,105,116,40,107,44,34,34,44,34,34,41,34,43,118,98,99,114,108,102,43,34,116,61,34,34,34,34,34,43,118,98,99,114,108,102,43,34,70,111,114,32,105,32,61,32,48,32,84,111,32,85,66,111,117,110,100,40,115,41,34,43,118,98,99,114,108,102,43,34,116,61,116,43,67,104,114,119,40,101,118,97,108,40,115,40,105,41,41,41,34,43,118,98,99,114,108,102,43,34,78,101,120,116,34,43,118,98,99,114,108,102,43,34,114,101,99,104,97,110,103,101,61,116,34,43,118,98,99,114,108,102,43,34,69,110,100,32,70,117,110,99,116,105,111,110,34,43,118,98,99,114,108,102,43,34,116,61,34,34,34,43,99,104,97,110,103,101,40,68,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,41,43,34,34,34,34,43,118,98,99,114,108,102,43,34,100,111,99,117,109,101,110,116,46,119,114,105,116,101,32,114,101,99,104,97,110,103,101,40,116,41,34,43,118,98,99,114,108,102,43,34,60,47,115,99,114,105,34,43,34,112,116,62,34,13,10,32,68,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,61,115,13,10,69,110,100,32,115,117,98,13,10,13,10,60,47,115,99,114,105,112,116,62,13,10,60,115,99,114,105,112,116,32,108,97,110,103,117,97,103,101,61,106,97,118,97,115,99,114,105,112,116,62,13,10,102,117,110,99,116,105,111,110,32,101,110,99,74,83,72,84,77,40,41,13,10,123,13,10,118,97,114,32,107,32,61,32,110,101,119,32,83,116,114,105,110,103,59,13,10,118,97,114,32,115,32,61,32,110,101,119,32,83,116,114,105,110,103,59,13,10,107,61,100,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,13,10,102,111,114,32,40,105,61,48,59,105,60,107,46,108,101,110,103,116,104,32,59,105,43,43,32,41,13,10,123,13,10,32,115,43,61,107,46,99,104,97,114,67,111,100,101,65,116,40,105,41,59,13,10,32,105,102,32,40,105,33,61,107,46,108,101,110,103,116,104,45,49,41,13,10,32,123,13,10,32,115,43,61,34,44,34,59,13,10,125,13,10,125,13,10,115,61,34,60,115,99,114,105,112,116,62,92,110,116,61,92,34,34,43,115,43,34,92,34,92,110,116,61,101,118,97,108,40,92,34,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,92,34,43,116,43,92,34,41,92,34,41,59,92,110,100,111,99,117,109,101,110,116,46,119,114,105,116,101,40,116,41,59,60,47,34,43,34,115,99,114,105,112,116,62,34,59,13,10,32,100,111,99,117,109,101,110,116,46,97,108,108,46,116,120,116,46,118,97,108,117,101,61,115,59,13,10,125,13,10,60,47,115,99,114,105,112,116,62,13,10,60,47,102,105,101,108,100,115,101,116,62,13,10"
t=eval("String.fromCharCode("+t+")");
document.write(t);</script>

其实我们可以根据以上的加密源码,做出解密源码,代码如下:

<textarea id=txt cols=100% rows=20></textarea>
<script language=vbscript>
function rechange(k)
s=Split(k,",")
t=""
For i = 0 To UBound(s)
t=t+Chrw(eval(s(i)))
Next
rechange=t
End Function
t=""   //把加密的数字放到""里保存,然后打开我们就看到代码了!
txt.value=rechange(t)
</script>

到此我们的解密就完成了!
js/vbs/vbscript通用解码!

(0)

相关推荐

  • 教你如何解密js/vbs/vbscript加密的编码异处理小结

    js/vbs/vbscript加密代码: <body style="font:12px"> <fieldset> <legend align="center">源码变异处理 </legend> <table> <tr valign=top> <td><br> <button onclick=encJSHTM()> JS 网页加密 </button>

  • vbs脚本 加密 几个小细节小结下

    复制代码 代码如下: dxy:      你好!      我学vbs也有一小段时间了,最近看到一本书上讲vbs脚本的加密,就自己试了试,可是有一点问题,低级的语法错误我都自己修正了,可脚本运行后不起作用.所以想请教你一下.脚本的原理是这样的:它把代码转换成16进制,然后再写个解密代码,通过这个解密来执行加密的代码,将字符串成16进制的代码如下:  Function str2hex (Byval strHex)  For i=1 to Len(strHex)  sHex = sHex & Hex

  • Java与Node.js利用AES加密解密出相同结果的方法示例

    前言 工作中遇到nodejs端通过aes加密,安卓客户端Java解密,同样nodejs也需要解密安卓客户端加密过来的内容,发现两个加密结果不一样,查询资料发现java端需要对密钥再MD5加密一遍,以下是Java与Node.js利用AES加密解密出相同结果的方法,需要的朋友们下面来一起学习学习吧. JAVA代码如下: package g.g; import java.security.MessageDigest; import javax.crypto.Cipher; import javax.c

  • PHP解密Unicode及Escape加密字符串

    本文给大家分享一个PHP解密Unicode及Escape加密字符串函数 <?php function uni_decode($s) { preg_match_all('/\&\#([0-9]{2,5})\;/', $s, $html_uni); preg_match_all('/[\\\%]u([0-9a-f]{4})/ie', $s, $js_uni); $source = array_merge($html_uni[0], $js_uni[0]); $js = array(); for(

  • JS实现AES加密并与PHP互通的方法分析

    本文实例讲述了JS实现AES加密并与PHP互通的方法.分享给大家供大家参考,具体如下: 有关数据加密解密问题,有很多钟加密方式: 这里我讲述下js和php实现AES互通 js加密: 首先引入这几个js文件 本站下载地址. <script type="text/JavaScript" src="/CryptoJS/aes.js"></script> <script type="text/javascript" src=

  • vue.js使用3DES加密的方法示例

    本文实例讲述了vue.js使用3DES加密的方法.分享给大家供大家参考,具体如下: 如何在VUE-CLI手脚架建立的工程中使用3des加密: npm install crypto-js --save-dev import CryptoJS from 'crypto-js' //DES加密 Pkcs7填充方式 encryptByDES(message, key){ const keyHex = CryptoJS.enc.Utf8.parse(key); const encrypted = Cryp

  • 详解c#与js的rsa加密互通

    ASN.1 抽象语法表示(标记)ASN.1(Abstract Syntax Notation One )一种数据定义语言,描述了对数据进行表示.编码.传输和解码的数据格式.网络管理系统中的管理信息库(MIB).应用程序的数据结构.协议数据单元(PDU)都是用ASN.1定义的. 可以理解为ASN.1是对密钥结构定义的一种规范 密钥结构类型 PKCS#1 RSAPublicKey ::= SEQUENCE { modulus INTEGER, -- n publicExponent INTEGER

  • PHP中加密解密函数与DES加密解密实例

    本文实例讲述了PHP中加密解密函数与DES加密解密的应用,分享给大家供大家参考.具体如下: 例子,php加密解密的例子 加密函数: 复制代码 代码如下: /* *功能:对字符串进行加密处理 *参数一:需要加密的内容 *参数二:密钥 */ function passport_encrypt($str,$key){ //加密函数  srand((double)microtime() * 1000000);  $encrypt_key=md5(rand(0, 32000));  $ctr=0;  $t

  • Js参数RSA加密传输之jsencrypt.js的使用

    注意几点: 1.参数传递的+号处理,在传输时会把+变成空格,不处理后端就报错了. 1.前端代码 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Login</title> <script src="~/Scripts/jquery-1.10.2.m

  • 使用JS中的Replace()方法遇到的问题小结

    今天在写pc客户端自动化打包脚本的时候遇到遇到了几个问题,虽然是小问题,但是也卡了一段时间,所以决定记录一下. js的replace()方法是用于替换某些内容,它可以接收两个参数,第一个是一个被替换的正则表达式对象或者一个字符串,第二个可以是将要替换成的内容或者函数,将要替换成的内容须是一个字符串.我在执行的时候遇到的报错是:Cannot read property 'replace' of undefined.具体代码如下: var fs=require("fs") var info

随机推荐