Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 1st, 2003, 04:47 PM
princetab princetab is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 princetab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How to hide code

I'm sure this has come up before..but I'm looking for something not too difficult (as I am a beginner) to prevent others from veiwing my code. Any help is appreciated...but helpful help is appreciated more.. Thanks in advance

Reply With Quote
  #2  
Old October 1st, 2003, 05:02 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,297 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 10 m 50 sec
Reputation Power: 104
Send a message via ICQ to christo Send a message via Yahoo to christo
What code? What language? There are hundreds of languages out there - some are compiled into binaries or bytecode, some are just left as text and interpreted and complied at runtime.. bla bla bla. You're really going to have to give us more clues as to what you're doing.

christo

Reply With Quote
  #3  
Old October 1st, 2003, 07:09 PM
princetab princetab is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 princetab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I meant the source code..I dont want anyone messing with or copying my html codes and tags..so in plan words..I want to block the "View Source" command. Any ideas?..

Reply With Quote
  #4  
Old October 1st, 2003, 07:17 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,297 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 10 m 50 sec
Reputation Power: 104
Send a message via ICQ to christo Send a message via Yahoo to christo
It's somthing that comes up regular as clockwork and there are various tools and scripts which attempt to do what you're looking for. You need to google for 'obfuscate html' or 'html obfuscation'. istr there are bits of javascript which can scramble body content with an onload() listener as the trigger.

christo

Reply With Quote
  #5  
Old October 1st, 2003, 07:20 PM
sacrilege sacrilege is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Norwich, UK
Posts: 53 sacrilege User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 1 m 53 sec
Reputation Power: 6
I'm pretty sure you can stop the 'View Source' option from working in Internet Explorer (I don't know how offhand), but I have no idea if it's possible with other browsers such as Mozilla - I honestly doubt it.

Even if you block the direct browser options to view the source, they still downloaded the file and it will be stored in a cache on the computer. There's no possible way to stop someone viewing source HTML if they want to, and really why should there be? You've got to take a serious look at your HTML and ask "Is there really anything here worth trying to *protect* from user's eyes?", chances are there really isn't. Why not leave it wide open and allow other people to look and learn from your layout if they like it?

Last edited by sacrilege : October 1st, 2003 at 08:17 PM.

Reply With Quote
  #6  
Old October 1st, 2003, 08:05 PM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
http://www.antssoft.com/htmlprotector/index.htm

This software sends the page as a string of escaped characters, and unescapes them on page load.

However, this does not stop the user viewing the source via the menu bar in IE. And if I could really be bothered, I could unescape the source code to get proper tags and formatting etc.

Due to client security, it is near impossible to actually change the menus of a users browser via html etc. So no matter what you do, someone can always see your source code
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Reply With Quote
  #7  
Old October 1st, 2003, 10:56 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
And what exactly makes you think your HTML is so special that you should protect it from others anyway? It's a freakin' markup language! HTML isn't even programming! What it comes down to is this: for people to view your webpages or graphics, they have to download them. Once they are downloaded, people can do anything they want with them. All you can do is make it slightly more difficult for the clueless to get at your source. Determined folks will figure out a way to get your source, assuming it's worth looking at anyway.

The only options I've seen that pose any kind of barrier are javascript character encoders that are easily worked around by the moderately clueful, and which make completely useless pages should a user not have javascript enabled (a lot of people don't.) It's really not worth it, in my opinion.

Reply With Quote
  #8  
Old October 1st, 2003, 11:21 PM
kfickert's Avatar
kfickert kfickert is offline
Capt'n
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2001
Posts: 553 kfickert User rank is Corporal (100 - 500 Reputation Level)kfickert User rank is Corporal (100 - 500 Reputation Level)kfickert User rank is Corporal (100 - 500 Reputation Level)kfickert User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 36 m 59 sec
Reputation Power: 9
I know I have a set of tools that encrypts PHP files so that people cannot veiw the source. Well actully I do it to make sure clients payme. Then I send them the source when they are happy and the check clears...

Reply With Quote
  #9  
Old October 2nd, 2003, 12:42 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,461 jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level)jharnois User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 15 h 14 m
Reputation Power: 825
princetab

How did you learn HTML? JavaScript? CSS?
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #10  
Old October 2nd, 2003, 08:31 AM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,297 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 10 m 50 sec
Reputation Power: 104
Send a message via ICQ to christo Send a message via Yahoo to christo
Whatever nobbing around you do client side, it doesn't take a genius to slurp at least your entire index page within 10 seconds on telnet, or a simple socket connection, or a bit of fiddling with curl or wget. so if you really want to secure your html 100%, you're gonna be a long long time trying

christo

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > How to hide code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT