Current location: Hot Scripts Forums » General Web Coding » JavaScript » disable view souce?


disable view souce?

Closed Thread
  #1 (permalink)  
Old 10-27-04, 10:26 AM
hptone hptone is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Question disable view souce?

what should i put in my html to prevent the visitor view my html source code ?thanks for your help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #2 (permalink)  
Old 10-27-04, 01:42 PM
zcorpan zcorpan is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Cannot be done.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #3 (permalink)  
Old 10-27-04, 02:14 PM
koncept
Guest
 
Posts: n/a
zcorpan is right it cannot be done, but it can be slowed down. I have heard of sites that hide the code but you could disable javascript and then you see the code
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #4 (permalink)  
Old 10-27-04, 03:42 PM
X - Factor UK X - Factor UK is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
i think i have read of something that scrambles source code... do a search on google... i will look further for you ok? i have been trying to do this too.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #5 (permalink)  
Old 10-27-04, 07:02 PM
Sabu Sabu is offline
Junior Code Guru
 
Join Date: Sep 2004
Posts: 458
Thanks: 0
Thanked 0 Times in 0 Posts
There are some scramblers out there that make it very hard to descramble, but ultimately you can't stop someone from viewing your source. Why would you want to, given that? Even then someone could write a simple browser program to spit out the final generated html out anyway.

There is no method of securely preventing someone from viewing your html source. Scrambling will ruin the site for anyone who doesn't allow javascript, for whatever reason.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #6 (permalink)  
Old 10-27-04, 10:18 PM
nekeno12 nekeno12 is offline
Wannabe Coder
 
Join Date: May 2004
Location: CO
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
NEWS FLASH! IT CAN'T BE DONE! Here's the link to encode source code:

http://www.dynamicdrive.com/dynamicindex9/encrypter.htm

but, it can be decoded at the same page. The problem is, the browser needs to be able to read the code. You can't encrypt the code and have it decoded server-side because HTML is never served live. It's always downloaded and cached and read from cache.

So, in conclusion: Forget about ecrypting your source.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #7 (permalink)  
Old 10-27-04, 10:31 PM
Sabu Sabu is offline
Junior Code Guru
 
Join Date: Sep 2004
Posts: 458
Thanks: 0
Thanked 0 Times in 0 Posts
NEWS FLASH!

You do realise that four people have already said it can't be done, right?

If you were going to do that basic encryption, though, you'd use something a little less standard, like

http://www.rlrouse.com/html-encryptor.html
http://www.prestigiousdames.com/char/57_chevy/ (view source)

That last one's pretty good, but as I said someone could make a browser output displayer. Mozilla has already done this, thanks to the DOM inspector (expand HTML, right click "body", select "copy xml", paste into favourite word processor)

Or write your own javascript decryptor, if you're really serious. But who is?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #8 (permalink)  
Old 10-29-04, 03:39 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
http://www.dynamicdrive.com/dynamicindex9/encrypter.htm
and
http://www.rlrouse.com/html-encryptor.html
does the exact same lame thing.
Using the escape method is the oldest way to hide your code. And it's the easietst to break since it requires only one command...

If you want to make it atleast challenging you should use atleast a script compressor or the "standard" way to encode files using the Microsoft Javascript encoder. It doesn't need to have the actual decoding algorithm in the script since the browser supports <script language="JavaScript.Encode"> scripts. But there's a small and fast decoder available for those who knows how to google...
Here's a link to a good script compressor, it's not meant to encode the script but it can be used that way.
http://entries.the5k.org/1007/index.html# (Go to Step 6 to see the compressor)
This one is a bit slow so I made my own version of it which prevents the "This script is taking too long to run, it might have crashed"-box from popping up when you compress big files.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #9 (permalink)  
Old 11-30-04, 06:46 PM
chriswatts chriswatts is offline
New Member
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Can't seem to disable the view source command but while looking to see how other sites that use the same web server as me have linked back to the server I noticed this site seems to have found a way of returning a warning message instead of the main site code. Don't know how they did it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #10 (permalink)  
Old 11-30-04, 07:13 PM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,167
Thanks: 3
Thanked 8 Times in 8 Posts
For chriswatts,

Just save the page locally first and then view the source. It gives you access to the HTML. Not much security with that.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to view database without using Datagrid mayagenesis ASP.NET 1 10-19-04 11:22 PM
View, edit, delete and add data to a database bigkid PHP 9 07-22-04 12:51 AM
ASP.NET: Day / Work Week / Week / Month web calendar control with view like MS Outloo gicio ASP.NET 2 06-09-04 03:12 AM
unable to view report Alecks Visual Basic 0 06-03-04 03:44 AM
I need a script that will disable the menu bar (file, edit etc).. Master-Chemist JavaScript 3 03-09-04 03:18 AM


All times are GMT -5. The time now is 06:12 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.