Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Location
    a place
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    source code encryption

    I am working on a site that i wish to encrypt the source code and/or disable the view source code attribut on the web browser, what is the best method for doing this?

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    The only way to stop the source being viewed is to not put it on the web.

  • #3
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    I'll paraphrase and say: The best method for disabling source view in a browser is not having a source to look at.

  • #4
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,088
    Thanks
    2
    Thanked 23 Times in 23 Posts
    You really don't want to encrypt your source code, unless you don't want to get indexed by the search engines. Remember, they read your source code, not the rendered page. If they can't read it, they won't index your site.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #5
    Regular Coder
    Join Date
    Mar 2005
    Location
    D0u$h!t3 k4?
    Posts
    512
    Thanks
    2
    Thanked 5 Times in 5 Posts
    There are quite a few ways to do this. However, none of them work at all. As others have said, the best way to keep your source safe is to not put it on the Web.

    If you search many forums, including this one, you will find numerous threads regarding this topic, all with the same answer:
    Post from the FAQ - HTML & CSS Frequently Asked Questions
    http://www.codingforums.com/showthread.php?t=4437
    Hiding Source
    How to hide web source?
    help on hiding my source
    Is there a way to put a lock on or hide my source?
    hide source code from html doc

    Those were all from this forum alone. You are not alone in your quest, but it is a hopeless quest. You simply cannot do it.
    PHP Code:
    $hello file_get_contents('hello.txt'); echo $hello
    hello

  • #6
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    whether u like it or not, the browser needs something to read from

  • #7
    Registered User
    Join Date
    Oct 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah, what you could do is put comments everyso often in your html like

    <!-- austin's -->
    or
    <!-- flashanims.com -->

    so if someone takes the code they take the comments too. then you can spot if someone totally copied your site.
    the comments can be deleted but you should at least right before the head section put a disclaimer. like mine for example.

    <!-- all code is copyright austin pray, flashanims.com
    if you would like to take a snippet of code, please contact austin.pray@gmail.com for permission.
    or link to flashanims.com instead. do not take any layout aspects without first contacting me at the
    email address above. -->
    <!-- website group code 512 -->

    it atleast makes the people think for half a second about not taking it

    all this assuming that the reason you want to hide your code from stealers...

    you could write all your code in pure javascript lol, it will take a couple years...but nobody will want to screw with javascript.

  • #8
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,634
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Completely bypassing the web page encryption done by $200 programs can be done simply via the "File" / "Save As" menu in Netscape 7.0 (specific version) or by using a "View Source" user script attached into the Opera or Firefox web browser. No form of encryption can block either of these two access methods All but two of the encryption programs I have seen can also be bypassed using a "View Source" bookmarklet/favlet (of the two that can't one completely disables popup windows and the other uses an invisible empty iframe to block the script from working) There are other ways to decrypt an encrypted web page but these three methods only require one or two mouse clicks to decrypt what the web author spent several minutes (or longer) encrypting in the first place.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •