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&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&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