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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypting and decrypting of files in ColdFusion

Status
Not open for further replies.

paragvshah

Programmer
Joined
Jan 11, 2001
Messages
109
Location
IN
I have seen a lot of applications written in ColdFusion on the net that have their pages encrypted.
The application will run perfectly but we are unable to view the code as it has been encrypted.
I would like to know how we can encrypt my code so that no one else will be able to read the source code.
Please also give me information on how to decrypt the code that I have encrypted as I should know how to decrypt it after encrytping the same.

PARAG
 
You should have a little executable called "Cfencode.exe" in your BIN directory under CFUSION. The syntax is:

cfencode infile outfile [/r /q] [/h "message"] /v"2"

/r = Recursive, when used with wildcards, recurses through subdirectories to encode files.
/q = Suppresses warning messages.
/h = Header, allows custom header to be written to the top of the encoded file(s).
/v= Required parameter that allows encoding using a specified version number. Use "1" for pages you want to be able to run on ColdFusion 3.x. Use "2" for pages you want to run strictly on ColdFusion 4.0 and later.
John Hoarty
jhoarty@quickestore.com
 
Please tell where can i get "Cfencode.exe". Please if you can provide me the exe file at paragshah79@hotmail.com or give me the link to get it from.

PARAG.
 
if you don't have cfencode.exe you should have a file in the cfusion/bin directory called cfcrypt.exe. if you go to a command prompt window and move to that directory on your machine and type in cfcrypt /? you will get the usage for the file.

This does not stop people from decrypting the file, as there are programs around that can decode the file. due to the nature of the way the file is encrypted, the encryption key has to be included in the encrpted file so that the server will be able to decrypt it and read it, there are programs that you can find quite easily.
 
It is always good to keep an "unencrypted" version of your site kicking around. There is a little script here that uses CFFILE and CFEXECUTE that will make a complete encrypted copy of your site.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top