ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I've got to write a report on protecting a sites content from being copied and I was wondering if anyone knows the code snippet that stops the a user from copying items on a page.
I'm sure I used it once before though I can't remember how it works
It was something along the lines of a basic js function though I'm sure there was some kind of command that would go into the body section of a html document to put the function into effect.
If someone can help me out them they would be doing me a big favor!
I should prob mention that I'm fairly new to js though you prob would have guessed that lol
A bit late as well, but you can not really protect the content. When a page is loaded in your browser, (some) stuff resides in temp directories. A slightly experienced user might know where that is and will be able to copy from there.
anybody can copy the URL from their address bar and use a tool such as wget to obtain the html source. Or you can just hit ctrl-u in mozilla browsers. It is completely infeasible to hide your source code from people using your site (you could, conceivably, create a script which downloads an encrypted version of your content, decrypts it and appends it to the browser DOM).
well I know there is no fool proof way to protect a sites content, though the idea is to make it more difficult for the less experianced user. There is one resource on the web that garbles the site code so a person viewing the source code will not be able to make sense of it.
I will get you the url when I can if you're interested.
well I know there is no fool proof way to protect a sites content, though the idea is to make it more difficult for the less experianced user.
... therefore effectively making computers harder to use for the people that are already having difficulties using them, while causing a minor inconvenience for the more exprienced user bad, bad, bad.
anybody can copy the URL from their address bar and use a tool such as wget to obtain the html source. Or you can just hit ctrl-u in mozilla browsers. It is completely infeasible to hide your source code from people using your site (you could, conceivably, create a script which downloads an encrypted version of your content, decrypts it and appends it to the browser DOM).
Althought it sounds ridiculous at first, I think he might have actually been on to something here.
Translate an open source encrypting algorithm into its javascript equivalent. Obfuscate the code beforehand to make it even more fun. Put a whole bunch of object dependecies in your page. And ofcourse in a good encryption scheme, the security is also enforced on the server side as well.(can't have the server breaking its own rules can we?) Something like, if such and such txt file is'nt in the directory. And ofcourse the txt file conviently dissappears when your server detects the client disconnect/refresh. And use frequent refreshes too.
With this scheme every connection gets different html code sent to it.
Make it so that even if they get the an HTML file out of the browser temp directory, they'll have a hell of a time trying to use it. Its crazy, but not impossible.
Althought it sounds ridiculous at first, I think he might have actually been on to something here.
Translate an open source encrypting algorithm into its javascript equivalent. Obfuscate the code beforehand to make it even more fun. Put a whole bunch of object dependecies in your page. And ofcourse in a good encryption scheme, the security is also enforced on the server side as well.(can't have the server breaking its own rules can we?) Something like, if such and such txt file is'nt in the directory. And ofcourse the txt file conviently dissappears when your server detects the client disconnect/refresh. And use frequent refreshes too.
With this scheme every connection gets different html code sent to it.
Make it so that even if they get the an HTML file out of the browser temp directory, they'll have a hell of a time trying to use it. Its crazy, but not impossible.
As soon as I wrote it I set out to find out if anybody had done it, and found, as I had expected to, that it's been done.
that's an interesting idea though I wouldn't really bother with it so much because if people can't view the source code then it just makes it more diffucult for users to work out how to use it and ultimatly learn.
If I've produced a script that's taken time to write then I might be a bit annoyed if someone uses if for commercial purposes, though it they're going to do the amature thing then they will not really get very far...
If I've produced a script that's taken time to write then I might be a bit annoyed if someone uses if for commercial purposes
That's why the GPL was invented. If anybody extends what you've done and licensed as GPL, they must also release it as GPL so you can make your original version better.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.