Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypting Server Side Code? 1

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
I have seen before someone encrypt all the code in an .asp page including the server side code, not just html in a javascript type of encryption.

Is there an easy way for me to encrypt me code? For the example, if I have a site that I'm going to let someone else use, but I don't want them to change the code or to pretend it's there's.

Thanks in advance... -Ovatvvon :-Q
 
We can use Microsoft's Script Encoder, its free downloadable one. I have encoded simple .asp files, i am facing some problems when i include some other asp files and try to encode the main asp file. If any one can tell me how to solve this problem ? thanks
 
Where can I get the Microsoft Script Encoder at Sreeman? -Ovatvvon :-Q
 
Wasn't working at first after I ran the setup file, but I put a copy into my winnt directory and my root program files directory. Once of those to made it work, not sure which one. Thanks soo much!!! -Ovatvvon :-Q
 
i've made some pages witch encript mutch easyer...
-->Encript.htm
Code:
<HTML>
<BODY>
<P><STRONG><FONT size=5>Please insert your file</FONT></STRONG></P>
<form action=&quot;encript.asp&quot; method=post>
<P><INPUT id=path type=file name=path></P>
<P><INPUT id=submit1 type=submit value=Crypt name=submit1></P>
</form>
</BODY>
</HTML>

-->Encript.asp
Code:
<%@ Language=VBScript %>
<%
set enc=Server.CreateObject(&quot;Scripting.Encoder&quot;)
path=Request(&quot;path&quot;)
set fso=Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
if not fso.FileExists(path) then
	Response.Write &quot;The file does not exist!&quot;
	Response.End 
end if
set fis=fso.OpenTextFile(path)
val=Right(path,3)
strData=fis.ReadAll
fis.close
if val=&quot;asp&quot; then
	strData = enc.EncodeScriptFile(&quot;.asp&quot;,strData,0,&quot;&quot;)
else
	strData = enc.EncodeScriptFile(&quot;.htm&quot;,strData,0,&quot;&quot;)
end if

set file = fso.CreateTextFile (path,true)
file.Write strData
file.close
set fso=nothing
set enc=nothing
%>
<html>
<body>
<h3>The file was succesfuly cripted!&quot;</h3>
</body>
</html>

hope this is useful... ________
George, M
 
Sreeman,
What did you mean when you said:

&quot;Its very simple but for complex asp files it needs some careful intervention.&quot;?? How so?


Shaddow,
I will try out your code later today or tomorrow. -Ovatvvon :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top