Hiding your source code

windows

Guest
Is there a simpler way of doing this without using ASP etc<!--content-->no possible way, not even in asp or php or java. your source code is there for the taking :D<!--content-->Except that you don't actually get to see the source code in php, asp, or any other server-side language, only the html it outputs. <br />
<br />
You cannot prevent visitors from accessing the HTML or javascript code should they want to.<!--content-->You can hide code/script in ASP the following way;<br />
USE #include "myfile.inc"<br />
and call proceures/functions from there!<br />
No one see the calls u made to those functions<br />
from the code!<br />
<br />
RAJ<!--content-->well if you go there you can hide any form of serverside code. but that doesn't change the fact that you can't grey out view->source<br />
<br />
<br />
hence his question? without using ASP<!--content-->Some people have written javascript "encryption" programs which garbles the source code and then use a 'key' to unlock it. For the very tenatious programmer who don't mind going through the process of manually finding the key and locating the encryption code and running it through the program and de-encrypt every page you still can not hide the source code.<br />
<br />
However, it remains a garbled blur for most.<br />
<br />
Offhand I would not use even "encrypted" (garbled) source code for sensitive information like passwords.<br />
<br />
For other purposes (just to throw novices, etc) I would not recommend you do it either.. after all, you probably learned by viewing other people's source code and you should probably allow others the same previledge.<br />
<br />
For both reasons above I recommend you leave your source code as is, and if security is a concern, consider server side languages (php, asp, perl, phyton, etc)<!--content-->it is impossible to hide source code.<br />
<br />
html and js are impossible to hide.<br />
<br />
[... edited ...]..:P<!--content-->kdjoergensen<br />
Some people have written javascript "encryption" programs which garbles the source code and then use a 'key' to unlock it. For the very tenatious programmer who don't mind going through the process of manually finding the key and locating the encryption code and running it through the program and de-encrypt every page you still can not hide the source code.<br />
<br />
<br />
lol - you don't even need to do that. Another member in the forums had tried to encrypt their page - but when you click on "Save" and open the file from the hard drive, all the encryption was gone.<br />
<br />
<br />
Hiding HTML code is against everything that the internet was designed to do. It was first set up to be a completely open exchange of information. Why would they the allow you to hide that information?<br />
<br />
<br />
I realise some people get very protective of their work, and do not wish anyone to steal it. Hey, I write stories and would get very angry if someone I showed it to ripped it off and put it out as their own work. That is why we have copyright laws and international agreements.<br />
<br />
<down from soapbox><!--content-->I agree,<br />
the same with images on webpages.. a lot of people put up no-right-click scripts, use transparent images to cover their regular images, etc except that you can easily go to your temporary internet files folder and find the image and then copy it wherever you want...;) <br />
<br />
also images can easily be copied by using the capture function in some graphics programs.:o <br />
<br />
So the objective of hiding anything is really mute.. <br />
<br />
:P<!--content-->If you garble your HTML, then what happens when the google-bot comes to visit. At present the bot cant read Javascript, or any other type of code beside HTML!!<br />
<br />
So the google-bot would leave with its tail between its legs :(<!--content-->:D OK - THX for very good comments/thoughts into this issue!<br />
<br />
I have an answer, believe it or not, that may surprise you!!<br />
<br />
We agree that hiding source code is virtually impossible! BUT<br />
I can right a VC++ program that will disable VIEW/SOURCE menu option, then user can see that option, but can not be able to click it!, That way no body can see the code!<br />
How about that!<br />
<br />
Q - How is it done!<br />
A - Create a windows hooks dll that will identify IE window based on Classname/ID; and than create a timer which will provide windows message(system) hooks that will disable it instantly, other optiiions are all available except View/Source! U will need to find out windows message that option is sending thru SPY++!<br />
Problem - This is dll has to be present on the PC where u are browsing - it is on client side; therefore need to be resident on the machine, meaning installed on the PC; There is a privacy issue here if you do that. But for your own use or your group od intranet use, this can be achieved.<br />
THX<br />
RAJ<!--content-->If I were to open my temporary Internet files I could have a little look at your source still... or if all else fails then have a look in Opera :D<!--content-->installing a client side dll/ app is a mute point. Thats like saying click here to make sure you can't see the source code of this site. Uhm, okay.... whatever. <br />
<br />
If you could put these things client side, you could disable TONS of features on pcs. We have a corporate intranet with locked down pcs... to the point of no address bar, no right clicking, no file menu and tons more. There is no way for the user to to these things (even if they upgrade browsers). Noone had to write any fancy code to get the job done either, they just use the IE registry file and adjusted things, then gave the pcs the locked version of IE(which is irreversible). <br />
<br />
Still, from an internet point... its mute. I wouldn't install that on my pc just so that you can feel better about hiding code that we can figure out anyway. Most websites aren't cool enough to even warrant this kind of protection... and the ones that are are written in flash or server side coding.<!--content-->Originally posted by rparmar <br />
:D OK - THX for very good comments/thoughts into this issue!<br />
<br />
I have an answer, believe it or not, that may surprise you!!<br />
<br />
We agree that hiding source code is virtually impossible! BUT<br />
I can right a VC++ program that will disable VIEW/SOURCE menu option, then user can see that option, but can not be able to click it!, That way no body can see the code!<br />
How about that!<br />
I could have told you that. in fact all you had to do was to make a ActiveX dll and do the samething, but when you do this you are not talking about internet anymore but the users machine. I agree with doc, if it was an intranet thing then yeah go for it or there are better ways besides a dll fix, but for the internet then it is a waste of time.<!--content-->LOL. I've looked at codes to some interesting looking web pages and to be honest, It's all Garble to me. Way too Advanced. Maybe someday I'll be able to determine what it all means. :D<!--content-->to be honest, I actually WANT people to view my well coded, concise pages (of which there aren't too many! :D )<br />
<br />
I mean, if I do a really good job on a site, I'd love to show it off. If that means that it raises the standards for 3 developers, gives new ideas to 2 developers, and inspires just one developer to create something new and exciting in their own way.... I'd say that leaving your source viewable is the only way to go. <br />
<br />
On a intranet, I'd say that hiding your source effectively defeats working together towards a common goal.<!--content-->Hmmmmm, well you can right click disable the mouse with Javascript, so people can't view the source code, as has already been mentioned. You could also use JavaScript to reload the page in a new window with menubar=none, so people couldn't use the File, Edit, View etc options to save the page to HD or view the source code. <br />
<br />
I hadn't thought of transparent GIFs over images, which is quite a neat trick, but it won't stop the determined, of course. Maybe you could use JavaScript to disable the Print Screen key to disallow screengrabs and also flush out the cache and temporary internet files folder upon exit? but there are programs to do screen grabs anyway.<br />
<br />
But the thing is, I learn HTML from other people's websites!<!--content-->After all the monkeying around trying different 'tricks' post your URL and I'll send a Bot to Download <!--more--> anything/everything from your site. Don't waste your time<!--content-->Refering to Dr. Webs comments<br />
"to be honest, I actually WANT people to view my well coded, concise pages " ...<br />
<br />
I think Dr. Web is completely correct in his assertion; I mean to explain or let know other developers whay you have had thought and create is great for all concerned; <br />
I think HTMLFORUMS.COM is great great web site for people like me and many more around the world, they are inspirational to us when we are stuck with design/code, it gives us good insight; of course one has to be knowledgabele!<br />
Thanks to HTMLForum that I can solve matters in few minutes rather than weeks,<br />
<br />
RAJ;)<!--content-->
 
Back
Top