if i don't want others to view my page's source code. what i have to do. they say it is not possible. but still i can find sites that view source menu is not active. how it is done?
do you know is it possoible to hide view source menu?
I confirm that it's impossible.
Give me those site and I'll give you their source code.
Give me those site and I'll give you their source code.
It are javascript tricks that only work in IE. But even in IE you can deactivate them.
You cant hide the source, One thing you can do is scrammble/encrypt your source... Heres a simple one: http://dynamicdrive.com/dynamicindex9/encrypter.htm
I'll agree that its impossible to hide your source code. there are many scripts to not display the 'show souce' link but there are other ways and javascript can be disabled anyway. Basicly if you dont it being used do as the person aboe said and encrypt (just use a better encryptor). The only problem comes when you need to change for whatever reason.
I agree that it is impossible to prevent others to view your source code. Someone could always Save your web pages to hard disk and even edit it using Web page editor. I don't know whether encryption works, but if you really want to keep the code to yourself, consider using server-side scripts like php, jsp, etc.
actually you can, it takes a little extra work and l've never tried this so l don't know for sure, but...
lf you use the php function "include" like so <?php include("document.htm") ?> on a blank page it will work. so if you make a php document all by itself for every page, then you use the include function to include the real page, then they won't be able to view the source.
Because php is left behind by the time it gets to the browser and the server handles it, they won't be able to see which page is being called.
So just create an extra .php page for every page and use that instead of the real page and it will work (in theory).
lf this helped you, donations are always appreciated
lf you use the php function "include" like so <?php include("document.htm") ?> on a blank page it will work. so if you make a php document all by itself for every page, then you use the include function to include the real page, then they won't be able to view the source.
Because php is left behind by the time it gets to the browser and the server handles it, they won't be able to see which page is being called.
So just create an extra .php page for every page and use that instead of the real page and it will work (in theory).
lf this helped you, donations are always appreciated
<?php include("document.htm") ?>
Above doesn't work. Please post if you know the solution.
Above doesn't work. Please post if you know the solution.
@Shamil
@KHO
You can still see the html. You cant see php anyway if its included or not but the html will still show
| Code: |
| <?php include('document.htm'); ?> |
@KHO
You can still see the html. You cant see php anyway if its included or not but the html will still show
I understand from posts that it is impossible to deactivate the View->Source menu. But i still remember that i have seen it deactivated. So looking forward to come across with it again and investigate.
| shamil wrote: |
| I understand from posts that it is impossible to deactivate the View->Source menu. But i still remember that i have seen it deactivated. So looking forward to come across with it again and investigate. |
No, it is possible, but it doesn't work in every browser, and it doesn't prevent people from viewing your source in any browser.
Here are some scripts: http://www.hypergurl.com/norightclick.html
For more information about why it can't possible be done: http://dorward.me.uk/www/hide/
| Stubru Freak wrote: |
|
No, it is possible, but it doesn't work in every browser, and it doesn't prevent people from viewing your source in any browser. Here are some scripts: http://www.hypergurl.com/norightclick.html For more information about why it can't possible be done: http://dorward.me.uk/www/hide/ |
I don't want to disable right click.
A browser which would allow a stupid script to disallow one of its menus would be a very insecure browser...
For preventing "View Source", it is not working. It will only "fool the fools" according to http://www.hypergurl.com/norightclick.html
But in fact, I have seen a website successfully preventing View Source although I don't know how it works.
But in fact, I have seen a website successfully preventing View Source although I don't know how it works.
| charliehk wrote: |
| For preventing "View Source", it is not working. It will only "fool the fools" according to http://www.hypergurl.com/norightclick.html
But in fact, I have seen a website successfully preventing View Source although I don't know how it works. |
Could you give the website? Then i can get the script from the source.
Even calling other files is not going to work. I made a (very simple) visual basic program to download any file. All you need to do is find the file name.
Bottom line: It's impossible to hide the source.
Bottom line: It's impossible to hide the source.
| shamil wrote: |
| I understand from posts that it is impossible to deactivate the View->Source menu. But i still remember that i have seen it deactivated. So looking forward to come across with it again and investigate. |
Regardless, my Fire Fox developer tools can view the source, you can never hide it from them. And yes l forgot to ad the ';' sorry, still new to php and it was about 3:00AM
| KHO wrote: | ||
Regardless, my Fire Fox developer tools can view the source, you can never hide it from them. And yes l forgot to ad the ';' sorry, still new to php and it was about 3:00AM |
It doesn't work because, you are right about that, php is parsed by the server. So the server includes the code from the other file before sending to browser. But it was a nice try.
Btw, bookmark this link and you can disable most context menu (right click menu) disablers and selection disablers (just make a new bookmark (or favorite in IE), and fill in this in the URL field):
javascript:document.oncontextmenu=void(0); document.onmousedown=void(0); window.onmousedown=void(0);
If you're on a page like that, just open it from your bookmarks (or favorites for IE), like it is a web page, and it will disable the protections.
This is an example of disabling right-click.
http://www.ab-world.co.uk/
I found that I couldn't view the source code after I did a right-click (before that I am able to view the source code)
But I don't know which part of the code did the trick. If anyone knows, please show me, thanks!
http://www.ab-world.co.uk/
I found that I couldn't view the source code after I did a right-click (before that I am able to view the source code)
But I don't know which part of the code did the trick. If anyone knows, please show me, thanks!
cannot be done, thats why its best to keep any sensitive information handled by a serverside programming language such as php/asp, as opposed to a client side language such as java. this way the actual hard code cannot be viewed unless the page itself is downloaded via ftp or some other transfer process, http requests are always processed prior to the page being loaded by the client.
sooooo thats why i say java/javascript is the devil!
sooooo thats why i say java/javascript is the devil!
oh yea...about disabling the right click menu...
that only limits those who are mildly retarded when it comes to computers, or their keyboard is lacking the mini-menu button, usually located in the lower righthand side of the keyboard, under the right shift button.
the source can also be viewed from the view menu at the top of the page. i mean if you really want to try to limit the funtionality you would use frames to hold any of your classified information and also disable the right mouse button. this way if view source is selected from the view menu, only the main pages' source will be viewed which will show that a frame is being used. in this situation the person would have to mouse over the frame and use the mini-menu button on their keyboard. or go to the link in the source of the main document that the frame is pointed to and load that page and view the source...
again it all depends on the level of knowledge, and the will to find the code by the user.
p.s. sorry if the above was a little hard to read...i've had a few drinks and i'm not quite on top of my game
that only limits those who are mildly retarded when it comes to computers, or their keyboard is lacking the mini-menu button, usually located in the lower righthand side of the keyboard, under the right shift button.
the source can also be viewed from the view menu at the top of the page. i mean if you really want to try to limit the funtionality you would use frames to hold any of your classified information and also disable the right mouse button. this way if view source is selected from the view menu, only the main pages' source will be viewed which will show that a frame is being used. in this situation the person would have to mouse over the frame and use the mini-menu button on their keyboard. or go to the link in the source of the main document that the frame is pointed to and load that page and view the source...
again it all depends on the level of knowledge, and the will to find the code by the user.
p.s. sorry if the above was a little hard to read...i've had a few drinks and i'm not quite on top of my game
1. If you're trying to hide the source of your web page, you're severely misunderstanding what this whole web thing is about.
2. The best you can hope for is to make your page "not worth the trouble"-- just use some CMS or Blog software that generates thousands of lines of not-quite-valid XHTML with CSS and tables and inline formatting and gratuitous Javascript thrown in for good measure. People trying to "steal" your source will take one look at it and go "****** it, this will take forever". And it's easy to find a CMS that generates inscrutable code: they all do.
3. Or why not go all the way? Program the whole thing in Flash. Normally I recommend avoiding Flash like it was full of AIDS, but in this case it would be a good fit with where I see this going.
PS: No disrespect intended, I'm just feeling sarcastic. But that doesn't mean what I'm saying isn't true.
2. The best you can hope for is to make your page "not worth the trouble"-- just use some CMS or Blog software that generates thousands of lines of not-quite-valid XHTML with CSS and tables and inline formatting and gratuitous Javascript thrown in for good measure. People trying to "steal" your source will take one look at it and go "****** it, this will take forever". And it's easy to find a CMS that generates inscrutable code: they all do.
3. Or why not go all the way? Program the whole thing in Flash. Normally I recommend avoiding Flash like it was full of AIDS, but in this case it would be a good fit with where I see this going.
PS: No disrespect intended, I'm just feeling sarcastic. But that doesn't mean what I'm saying isn't true.
| charliehk wrote: |
| This is an example of disabling right-click.
http://www.ab-world.co.uk/ I found that I couldn't view the source code after I did a right-click (before that I am able to view the source code) But I don't know which part of the code did the trick. If anyone knows, please show me, thanks! |
| Code: |
|
<SCRIPT src="rightmenu.js" type=text/javascript> //Right-click menu- By Eyecon (http://www.webteam.ro) //Slight modifications by JK //Visit JavaScript Kit (http://javascriptkit.com) for script </SCRIPT> |
rightmenu.js:
| Code: |
| //eyesys dhtml (c)eyecon 2002 [ eyecon@webteam.ro ]
//visit www.webteam.ro for great scripts and tutorials var ie5=window.createPopup if (ie5) document.oncontextmenu=init; var eyesys=""; var preitem=""; function init(){ mx=event.clientX; my=event.clientY; menx=window.screenLeft+mx; meny=window.screenTop+my; sysmen=window.createPopup(); sysmen.document.write(eyesys); sysmen.show(menx,meny,eyesys_width,document.getElementById('men').offsetHeight); return false }; function eyesys_init(){ if (ie5){ eyesys+=("<style type='text/css'>.textul{position:absolute;top:0px;color:"+eyesys_titletext+";writing-mode: tb-rl;padding-top:10px;filter: flipH() flipV() dropShadow( Color=000000,offX=-2,offY=-2,positive=true);z-Index:10;width:100%;height:100%;font: bold 12px sans-serif}.gradientul{position:relative;top:0px;left:0px;width:100%;background-color:"+eyesys_titlecol2+";height:100%;z-Index:9;FILTER: alpha( style=1,opacity=0,finishOpacity=100,startX=100,finishX=100,startY=0,finishY=100)}.contra{background-color:"+eyesys_titlecol1+";border:1px inset "+eyesys_bg+";height:98%;width:18px;z-Index:8;top:0px;left:0px;margin:2px;position:absolute;}.men{position:absolute;top:0px;left:0px;padding-left:18px;background-color:"+eyesys_bg+";border:2px outset "+eyesys_bg+";z-Index:1;}.men a{margin:1px;cursor:default;padding-bottom:4px;padding-left:1px;padding-right:1px;padding-top:3px;text-decoration:none;height:100%;width:100%;color:"+eyesys_cl+";font:normal 12px sans-serif;}.men a:hover{background:"+eyesys_bgov+";color:"+eyesys_clov+";} BODY{overflow:hidden;border:0px;padding:0px;margin:0px;}.ico{border:none;float:left;}</style><div class='men'>") } }; function eyesys_item(txt,ico,lnk){ if (ie5){ if(!ico)ico='s.gif'; preitem+=("<a href='#' onmousedown='parent.window.location.href=\""+lnk+"\"'><img src='"+ico+"' width='16' height='16' class='ico'> "+txt+"</a>") } }; function eyesys_close(){ if (ie5){ eyesys+=preitem; eyesys+=("</div><div class='contra'><div class='gradientul'></div><div class='textul' id='titlu'>"+eyesys_title+"</div></div>"); document.write("<div id='men' style='width:"+eyesys_width+"'></div>"); document.getElementById('men').innerHTML=preitem } } |
Thanks, but which part of the code (or which statement) disable right click; and which part of the code (or which statement) disable "View source code"?
| charliehk wrote: |
| Thanks, but which part of the code (or which statement) disable right click; and which part of the code (or which statement) disable "View source code"? |
document.oncontextmenu=init;
Calls the init() function when trying to right click.
Disabling source code: no idea
| Stubru Freak wrote: | ||
document.oncontextmenu=init; Calls the init() function when trying to right click. Disabling source code: no idea |
I couldn't see any code that it can prevent viewing source. May be it is one of the bug of ie.
| shamil wrote: | ||||
I couldn't see any code that it can prevent viewing source. May be it is one of the bug of ie. |
Think so too
I think its better if you use the html protector program,
here to download it :
http://www.antssoft.com/download.htm
here to download it :
http://www.antssoft.com/download.htm
| oasis wrote: |
| I think its better if you use the html protector program,
here to download it : http://www.antssoft.com/download.htm |
I wonder why they don't use their own features on their own web site?
If anyone is using this, please let me know so I can go get your source code...

| S3nd K3ys wrote: | ||
I wonder why they don't use their own features on their own web site? If anyone is using this, please let me know so I can go get your source code... ![]() |
I just spent the last 10 minutes visiting and viewing the source of every page I tried in their "customer's" list.
Just to throw in my two cents: Yeah, it's impossible to hide your source code. Your browser has to download the document in order for you to see it, and if the document is sitting on your harddrive, you can open 'er up.
If you're REALLY paranoid, the advantage of Flash is that you can't just right-click it and view the source; it's made of animations and such, and if they did view the source for the page, all they would see is a body tag and the tag the shows the Flash.
If it's some uber-amazing scripting you're trying to hide, I say go with PHP. Because it's a server-side script, it only sends the browser the boiled down information, only the information that you tell it to send to allow the user to view a page.
But the real question is: Why would you want to hide your source code? Imitation is the sincerest form of flattery, and if you see other sites with your source, take it as a compliment.
But if you really want to be crafty, here's an idea: If I knew how, what I would do is insert a signature into the code that says something along the lines of "This code was made by PatTheGreat. Visit PatTheGreat.com!" Then, I would write a bit of code that made the whole webpage fall apart unless that was in there.
That way, anyone who steals the code from the person who stole the code would know who created the site. And for those smart enough to bypass such things, I would hope they wouldn't have to stoop so low as to not include some sort of bibliography.
That probably earned by 2 Frih points.
If you're REALLY paranoid, the advantage of Flash is that you can't just right-click it and view the source; it's made of animations and such, and if they did view the source for the page, all they would see is a body tag and the tag the shows the Flash.
If it's some uber-amazing scripting you're trying to hide, I say go with PHP. Because it's a server-side script, it only sends the browser the boiled down information, only the information that you tell it to send to allow the user to view a page.
But the real question is: Why would you want to hide your source code? Imitation is the sincerest form of flattery, and if you see other sites with your source, take it as a compliment.
But if you really want to be crafty, here's an idea: If I knew how, what I would do is insert a signature into the code that says something along the lines of "This code was made by PatTheGreat. Visit PatTheGreat.com!" Then, I would write a bit of code that made the whole webpage fall apart unless that was in there.
That way, anyone who steals the code from the person who stole the code would know who created the site. And for those smart enough to bypass such things, I would hope they wouldn't have to stoop so low as to not include some sort of bibliography.
That probably earned by 2 Frih points.
shamil
А person knowledgable enough to want to steal your source code will probably know how to have a proper set-up in the browser so that the context menu cannot be altered or disabled
For example Multizilla extension for Mozilla\Seamonkey browser that I use has an option to always preserve the original context menu. And it works - you can try it
Ijust checked that example of allegedly disabled right-click (earlier posts) http://www.ab-world.co.uk/
well right-click is NOT disabled in my browser, I still have my original context menu - and I didn't even disable java script (but I did disallow their java applets)
А person knowledgable enough to want to steal your source code will probably know how to have a proper set-up in the browser so that the context menu cannot be altered or disabled
For example Multizilla extension for Mozilla\Seamonkey browser that I use has an option to always preserve the original context menu. And it works - you can try it
Ijust checked that example of allegedly disabled right-click (earlier posts) http://www.ab-world.co.uk/
well right-click is NOT disabled in my browser, I still have my original context menu - and I didn't even disable java script (but I did disallow their java applets)
| Alya wrote: |
| shamil
А person knowledgable enough to want to steal your source code will probably know how to have a proper set-up in the browser so that the context menu cannot be altered or disabled For example Multizilla extension for Mozilla\Seamonkey browser that I use has an option to always preserve the original context menu. And it works - you can try it Ijust checked that example of allegedly disabled right-click (earlier posts) http://www.ab-world.co.uk/ well right-click is NOT disabled in my browser, I still have my original context menu - and I didn't even disable java script (but I did disallow their java applets) |
Lol you don't need an extension for that, bad written IE-only code...
Stubru Freak
Yes, I'm sure with IE's bad-written code everything is possible
That's why I don't use IE
But with Mozilla you need an extention - before I started using Multizilla I had that problem on some sites, that they'd disable or alter Mozilla's context menu
Yes, I'm sure with IE's bad-written code everything is possible
That's why I don't use IE
But with Mozilla you need an extention - before I started using Multizilla I had that problem on some sites, that they'd disable or alter Mozilla's context menu
| Alya wrote: |
| Stubru Freak
Yes, I'm sure with IE's bad-written code everything is possible That's why I don't use IE But with Mozilla you need an extention - before I started using Multizilla I had that problem on some sites, that they'd disable or alter Mozilla's context menu |
No, I mean, not that site, it has IE-specific code, I use firefox without any extension and I have the normal context menu.
oh, I see what you mean - I guess many sites wouldn't bother writing extra code to disable context menu in a minority browser like Mozilla\Seamonkey. So using non-IE browser will help too
What advantage would hiding your source code actually have? I have to agree with Texas Al here as he is spot on. But really, anything to do with security needs to be on the server side anyway so it's no biggy if someone comes along and says "this looks pretty" and nicks it, you can stop hotlinkers and there's nothing you can do in html or even javascript that someone else couldn't do themselves.
So stop playing old man in a council house with large rottweiler.
So stop playing old man in a council house with large rottweiler.
There are some tools that encrypts your html code. You might give them a try.
Anyway, there must be a very few things you could do with html that havn't been already done, and just in the case you think you've done something absolutely new, you can be sure another guy will be doing the same soon. It's just a matter of numbers, so who cares?
Anyway, there must be a very few things you could do with html that havn't been already done, and just in the case you think you've done something absolutely new, you can be sure another guy will be doing the same soon. It's just a matter of numbers, so who cares?
The reason why i have a look at this thread is to know how to disable the i.e source view menu ,just for my curiosity. when i visit some sites i was surprised 'cause i couldn't see the source code, like the one above 'http://www.ab-world.co.uk/ '. disabling right click context menu in i.e is kinda simple but to disable drop down menu "view -source" in i.e is interesting. I don't need to disable the menu on my webpage but i'm just curious how do they work it out. Looks like nobody here knows how to do it, but just keep saying there's no use hiding source code and it's always possible to crack out the source code. are they using some kind of java applet to disable the i.e view source drop down menu? hmm....
| afracsass wrote: |
| The reason why i have a look at this thread is to know how to disable the i.e source view menu ,just for my curiosity. when i visit some sites i was surprised 'cause i couldn't see the source code, like the one above 'http://www.ab-world.co.uk/ '. disabling right click context menu in i.e is kinda simple but to disable drop down menu "view -source" in i.e is interesting. I don't need to disable the menu on my webpage but i'm just curious how do they work it out. Looks like nobody here knows how to do it, but just keep saying there's no use hiding source code and it's always possible to crack out the source code. are they using some kind of java applet to disable the i.e view source drop down menu? hmm.... |
I don't know what your pc does, but on my IE I can perfectly see the source.
But i'm sure that there are some web site that disable the view-source menu and when you click it nothing pops up.
i just figured it out that after right click the drop down menu does not work....
| afracsass wrote: |
| The reason why i have a look at this thread is to know how to disable the i.e source view menu ,just for my curiosity. when i visit some sites i was surprised 'cause i couldn't see the source code, like the one above 'http://www.ab-world.co.uk/ '. disabling right click context menu in i.e is kinda simple but to disable drop down menu "view -source" in i.e is interesting. I don't need to disable the menu on my webpage but i'm just curious how do they work it out. Looks like nobody here knows how to do it, but just keep saying there's no use hiding source code and it's always possible to crack out the source code. are they using some kind of java applet to disable the i.e view source drop down menu? hmm.... |
I understand you. I was also thinking like you. Now I understand that it is not possible to hide view source menu. You may disable right click as it is not surprising. Sometimes it is possible to see that view source menu doesn't work. I think it is due to errors in the page or any of the browser bugs. I even witnessed it when creating my site(sometimes vs menu didn't work).
Browser needs source code to to interpret it. Disabling it via script will ensure browser vulnerability to insecure scripts(as one of the guy told).
I think now you think what we think (a wink )
i must disagree with almost everyone.its not impossible
u can use an real old trick to do what u want
u just need to do the index like a frame page
and the 1st frame will load the rest
when ppl tries to see your source will only show the source
for the frame page, even if people goes file->save web page
will only save the frame page
old tricks that will always be around
u can use an real old trick to do what u want
u just need to do the index like a frame page
and the 1st frame will load the rest
when ppl tries to see your source will only show the source
for the frame page, even if people goes file->save web page
will only save the frame page
old tricks that will always be around
you can still view a source code by going to the tool bar to
edit>view source
unless you put it in a frame but I bet there's some way around that too.
edit>view source
unless you put it in a frame but I bet there's some way around that too.
| rheanna wrote: |
| you can still view a source code by going to the tool bar to
edit>view source unless you put it in a frame but I bet there's some way around that too. |
you will only see the frame page source
u cant see what its being loaded since is an outside source file
| Astrolopitecos wrote: | ||
you will only see the frame page source u cant see what its being loaded since is an outside source file |
In that case you can copy paste the url of the frame you want to see from that frame page source to your browsers location field.
But just telnetting to port 80 is even easier
| Astrolopitecos wrote: |
| i must disagree with almost everyone.its not impossible |
| Quote: |
| u can use an real old trick to do what u want
u just need to do the index like a frame page and the 1st frame will load the rest |
| Quote: |
| old tricks that will always be around |
Quick question:
How would the browser know how to display a web page without being able to interpret the HTML code? The logical conclusion is that it wouldn't, and it thus needs the source. If the browser can access the source, the user can view it.
The PHP code will never show, and writing good html is just a matter of practise, there is no reason to hide html source (in fact life would be easier for all of us if everyone used good html).
How would the browser know how to display a web page without being able to interpret the HTML code? The logical conclusion is that it wouldn't, and it thus needs the source. If the browser can access the source, the user can view it.
The PHP code will never show, and writing good html is just a matter of practise, there is no reason to hide html source (in fact life would be easier for all of us if everyone used good html).
