Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 2nd, 2007, 05:36 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Encrypting ASP source code

I want to encrypt few lines of asp source code. Is there any tool or any component to perform this task?

http://www.ithighway.co.uk/
 
Old November 2nd, 2007, 07:41 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

By encrypting are you talking a one-way cipher like an MD5 hash or are you talking about a 2-way cipher like a Base64 encode? What are you trying to encrypt?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
 
Old November 4th, 2007, 12:30 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default

I want to encyrpt the source code:

Example, I have a file containing following variables. I want to encrypt asp code in it so no other programmer can change the values of these varaibles.

<%
CONST txtWebsiteName = "VansGifts.com"
CONST txtWebsiteUrl = "http://www.vansgifts.com"
%>

http://www.ithighway.co.uk/
 
Old November 4th, 2007, 11:48 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Well, simply put, you can not execute encrypted source code. For example, say that you use an MD5 hash on your txtWebsiteUrl and the hash is

aAabbCccDef45 (obviously this is just a random string but you get the point)

You could not do:
Response.Redirect txtWebsiteUrl

because the string is simply an MD5 hash!

The easiest way to do this would be to Base64 encode your values and then, before you go to use them, decode their values back to a useable string.

It is a ruidmentary task to encode and decode strings as Base64 but it is a moot point really because, even if you were to use a 2 way cipher (DES for example), if a random programmer got access to your source code, all they would need to do is figure out what cipher you were using, create their own encrypted string using said cipher, and place it in your code and they would have gotten around your encryption.

hth.


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
 
Old November 4th, 2007, 04:23 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default

I am using a banner manager software and it has following encrypted code in all of it's pages:



<%#@~^IAMAAA==@#@&B&JzJzzJzJ&zJP]+1+r-PfmOl,zzJ&&zJzJz@#@&;dM'.+asl1+c.;EndD`EEk.r#'rJ BJBr~rE#@#@&2h9'.naVl1n`M+;!ndYvJah[Jb'rJSJEE~rJb@#@&@#@&rW,Vnxv;kDb@*!,lx9P^nxvwAN*@* T~Dt+ @#@&ik0,;dD{l9:rx;dMPCx9~wSNxC9:kU2SN~Y4n @#@&idk+/kkKU`r6slzA\m!/Drb'rlNsrUkkYMlOW.E@#@&7+^d+@#@&77a/;sxr/nV^DPM,0MW:,6^Cb~HCN7+.Ob/+MdPSt+Mn~EkD{BE[;dM[EB,Cx9P2A9'BE'ah[[rvr@#@&idk+Y,mKUx{/nD7+. 1D+mO+K4L^O`rbGr9A /KxU+1OkKxEb@#@&d7^KxURK2x~1W x+1YbGx@#@&7dk+O~M/'1Gx R+Xn^ED+vwd;sb@#@&7dbWP WOcM/RnG6#~Y4n @#@&idi/+k/bGxvJaVmb$\|E/ME#{D/vECN7+MYr/n.bNE#@#@&di+sd@#@&77i:n/kCT+xrq \l^k9~Ek+.xm:n~JPwmd/SWD9E@#@&idx[PrW@#@&7dMdR1VGd@#@&77k+OPMd{xGDtbxo@#@&i7mKxUR1V Gd@#@&i7/YP1GUx{xKY4kUL@#@&7+ [Pb0@#@&ik0~d/dkKUvJa^lzAH|Ek.J*@!@*JrPCU9P:d/mo+{EEPDtx~DndaWU/ DNr.mY~Es+UEcCkwE@#@&xN,k6@#@&k+d/bWUcr6Vm)1t{Ek.E#{Jr@#@&vuUAAA==^#~@%>

<title><%=#@~^BQAAAA==ObYsIgIAAA==^#~@%></title>


What type of encryption is this? Any idea

http://www.ithighway.co.uk/
 
Old November 5th, 2007, 04:06 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It is not encryption more it is some sort of encoding (I think). The reason is because there seem to be predefined Begining of Line and end of line characters:

@~ and ~@

I am not sure though.


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
help me with source code of Asp.net E-commerce... susanfletcher ASP.NET 1.0 and 1.1 Basics 1 October 18th, 2008 09:20 AM
can't setup Professional ASP.NET 1.0 source code gologo ASP.NET 1.0 and 1.1 Basics 0 December 11th, 2006 07:47 AM
ASP.NET ECommerce Programming source code AlMukhtar All Other Wrox Books 1 March 8th, 2006 11:02 AM
Source Code for: Beginning ASP.NET E-Commerce with imran4sin All Other Wrox Books 1 November 17th, 2003 12:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.