ASP code Encryption _ script plus decryption

Source: Internet
Author: User
Tags chr
ASP code is generally clear, there is little encryption, MS has a tool script encoder can be encrypted, this dongdong can be downloaded for free Microsoft Official website, but also has detailed use instructions, but after it encrypted file will have <%@ language = Vbscript.encode%&gt, the administrator sees this sentence to know that this ASP file is encrypted. There are also related decryption files.
This article provides a simple method, you can encrypt the ASP code, the main idea is to do some operations, such as the whole code to move a bit, basically even if the encryption, the main decryption function is as follows:

function Unencode (temp)
But=1
For I =1 to Len (temp)
If Mid (temp,i,1) <> "Soup" Then
PK=ASC (Mid (temp,i,1))-but
If pk>126 Then
pk=pk-95
ElseIf Pk<32 Then
Pk=pk+95
End If
A=A&AMP;CHR (PK)
Else
A=a&vbcrlf
End If
Next
Unencode=a
End Function

function Encode (temp)
But=1
Cc=replace (Temp,vbcrlf, "soup")
For i= 1 to Len (cc)
If Mid (cc,i,1) <> "Soup" Then
PK=ASC (Mid (cc,i,1)) +but
If pk>126 Then
pk=pk-95
ElseIf Pk<32 Then
Pk=pk+95
End If
A=A&AMP;CHR (PK)
Else
a=a& "Soup"
End If
Next
A=replace (A, "" "," "" "" ")
Encode=a
End Function

At the time of development, the key ASP code is usually encode and then executed using Excute (Uncode (ipaddr)). This way the administrator can not see the key code directly, generally not in the program with the Encode function, only in the development of the use, in addition, Unencode can also be changed to other function names.
This way encryption is relatively simple, decryption is also very easy.
Related Article

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.