ASP codes are generally plain text and rarely encrypted. MS has a tool called Script Encoder that can be encrypted. This stuff can be downloaded for free from Microsoft's official website, and there are detailed instructions for use, but the files encrypted by it will have <%@ language = vbscript.encode %>, when the administrator sees this sentence, he will know that the asp file is encrypted. And there are also related decrypted files.
This article provides a simple method to encrypt ASP code. The main idea is to do some operations on the code, such as moving all the code by one bit, and it is basically encrypted. 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)<>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
functionEncode(temp)
but=1
cc=replace(temp,vbcrlf,soup)
for i= 1 to len(cc)
if mid(cc,i,1)<>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
During development, you usually Encode the key ASP code and then use Excute(Uncode(ipaddr)) to execute it. In this way, administrators generally cannot see key codes directly. Generally, the Encode function is not included in the program and is only used during development. In addition, UnEncode can also be changed to other function names.
Encryption in this way is relatively simple, and decryption is also easy.