ASP code Encryption

Source: Internet
Author: User
Tags chr

ASP code is generally clear text, rarely encrypted, MS has a tool script encoder can be encrypted, this east can be the official website of Microsoft free download, and there are detailed instructions for use, but after its encrypted file will have <%@ language = Vbscript.encode%> The administrator sees this phrase and knows that the ASP file is encrypted. And there are related decryption files.
This article provides a simple method, you can encrypt the ASP code, the main idea is to do some of the code to do some operations, such as the whole code to move a bit, basically even if the encryption, the main encryption and decryption functions are 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, it is common to encode the key ASP code and then use Excute (Uncode (IPADDR)) to execute it. In this way, administrators generally can not directly see the key code, generally in the program do not take the Encode function, only in the development of the time to use, in addition, Unencode can also be changed to other function names.
This way encryption is simple, decryption is easy

ASP code Encryption

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.