How to decrypt different codes encrypted by js, vbs, and vbscript

Source: Internet
Author: User


Js/vbs/vbscript encryption code:

<Body style = "font: 12px">
<Fieldset>
<Legend align = "center"> source code variation processing </legend>
<Table>
<Tr valign = top>
<Td> <br>
<Button onclick = encJSHTM ()> JS webpage encryption </button> <br>
<Button onclick = encVBSHTM ()> VBS web page encryption </button> <br>
<Button onclick = encVBS ()> VB Script encryption </button> <br>
<Br> <p style = "font: 12px">
Note: <br>
Copy the content to be encrypted to the <br> box and click the corresponding button. <br> the operation can be completed. <br>
If a running error occurs, <br> refresh the page and generate it! </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;
Kmeandocument.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>

Step 2: perform a test to encrypt the above Code using js. The encryption effect is as follows:

<Script>
T = "111,100,121, 32,115,116,121,108,101, 102,111,110,116, 50,112,120, 60,102,105,101,108,100,115,101,116, 108,101,103,101,110,100, 108,105,103,110, 99,101,110,116,101,114, 28304,30721, 47,108,101,103,101,110,100, 98,108,101, 116,114, 32,118, 97,108,105,103,110, 61,116,111,112, 116,100, 98,114, 98,117,116,116,111,110, 32,111,110, 99,108,105, 99,107, 61,101,110, 98,117,116,116,111,110, 98,114, 98,117,116,116,111,110, 32,111,110, 99,108,105, 99,107, 61,101,110, 117,116,116,111,110, 98,114, 98,117,116,116,111,110, 32,111,110, 99,108,105, 99,107, 61,101,110, 98,117,116,116,111,110, 98,114, 98,114, 115,116,121,108,101, 102,111,110,116, 50,112,120, 98,114, 98,114, california, California, 23481,60, 98,114, 98,114, 98,114, 21046,21040, California, 65292,60, California, 98,114, 98,114, 116,100, 116,100, 116,101,120,116, 97,114,101, 105,100, 61,116,120,116, 111,108,115, 114,111,119,115, 116,101,120,116, 97,114,101, 116,100, 62, 47,116, 108,101, 114,105,112,116, 32,108, 97,110,103,117, 97,103,101, 61,118, 98,115, 99,114,105,112,116, 10,102,117,110, 99,116,105,111,110, 110,103,101, 40,107, 32,102,111,114, 32,105, 32,116,111, 101,110, 40,107, 32,115, 61,115, 109,105,100, 40,107, 44,105, 32,110,101,120,116, 110,103,101, 61,108,101,102,116, 40,115, 44,108,101,110, 40,115, 101,110,100, 32,102,117,110, 99,116,105,111,110, 83,117, 101,110, 32,115, 102,117,110, 99,116,105,111,110, 32,114,101, 99,104, 97,110,103,101, 40,107, 43,118, 114,108,102, 83,112,108,105,116, 40,107, 43,118, 114,108,102, 99,114,108,102, 70,111,114, 32,105, 111,117,110,100, 40,115, 34, 43,118, 114,108,102, 67,104,114,119, 40,101,118, 97,108, 40,115, 40,105, 43,118, 114,108,102, 78,101,120,116, 99,114,108,102, 114,101, 99,104, 97,110,103,101, 61,116, 99,114,108,102, 69,110,100, 117,110, 99,116,105,111,110, 99,114,108,102, 99,104, 97,110,103,101, 117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 43,118, 114,108,102, 101,120,101, 99,117,116,101, 40,114,101, 99,104, 97,110,103,101, 40,116, 68,111, 99,117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 61,115, 69,110,100, 32,115,117, 32,110,101,110, 32,115, 60,115, 99,114,105,112,116, 43,118, 114,108,102, 99,104, 97,110,103,101, 117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 43,118, 114,108,102, 101,118, 97,108, 116,114,105,110,103, 46,102,114,111,109, 67,104, 97,114, 67,111,100,101, 43,118, 98,115, 99,114,108,102, 100,111, 99,117,109,101,110,116, 46,119,114,105,116,101, 40,116, 34,115, 99,114,105,112,116, 117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 61,115, 69,110,100, 83,117, 101,110, 114,105,112,116, 32,108, 97,110,103,117, 97,103,101, 61,118, 98,115, 99,114,105,112,116, 43,118, 114,108,102, 102,117,110, 99,116,105,111,110, 32,114,101, 99,104, 97,110,103,101, 40,107, 43,118, 114,108,102, 83,112,108,105,116, 40,107, 43,118, 114,108,102, 99,114,108,102, 70,111,114, 32,105, 111,117,110,100, 40,115, 43,118, 114,108,102, 67,104,114,119, 40,101,118, 97,108, 40,115, 40,105, 43,118, 114,108,102, 78,101,120,116, 99,114,108,102, 114,101, 99,104, 97,110,103,101, 61,116, 99,114,108,102, 69,110,100, 117,110, 99,116,105,111,110, 99,114,108,102, 99,104, 97,110,103,101, 117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 43,118, 43, 34, 34, 34, 114,108,102, 100,111, 98, 99, 99,117,109,101,110,116, 46,119,114,105,116,101, 32,114,101, 99,104, 97,110,103,101, 40,116, 43,118, 114,108,102, 60, 47, 115,99, 114,105, 34,112,116, 117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 61,115, 69,110,100, 32,115,117, 47,115, 99,114,105,112,116, 114,105,112,116, 32,108, 97,110,103,117, 97,103,101, 61,106, 97,118, 97,115, 99,114,105,112,116, 10,102,117,110, 99,116,105,111,110, 32,101,110, 10,118, 97,114, 32,107, 32,110,101,119, 116,114,105,110,103, 10,118, 97,114, 32,115, 32,110,101,119, 116,114,105,110,103, 10,107, 61,100,111, 99,117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 102,111,114, 108,101,110,103,116,104, 10,123, 32,115, 99,104, 97,114, 67,111,100,101, 65,116, 40,105, 32,105,102, 61,107, 46,108,101,110,103,116,104, 10,125, 13, 10,115, 60,115, 99,114,105,112,116, 110,116, 43,115, 34, 92,110,116, 61,101,118, 97,108, 116,114,105,110,103, 46,102,114,111,109, 67,104, 97,114, 67,111,100,101, 110,100,111, 99,117,109,101,110,116, 46,119,114,105,116,101, 40,116, 34,115, 99,114,105,112,116, 100,111, 99,117,109,101,110,116, 108,108, 46,116,120,116, 46,118, 97,108,117,101, 61,115, 10,125, 114,105,112,116, 47,102,105,101,108,100,115,101,116, 10"
T = eval ("String. fromCharCode (" + t + ")");
Document. write (t); </script>

In fact, we can decrypt the source code based on the above encryption source code. The Code is as follows:

<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 = "" // put the encrypted number in "" and save it. Then open it and we will see the code!
Txt. value = rechange (t)
</Script>

At this point, our decryption is complete!
Js/vbs/vbscript common decoding!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.