The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permissions

Discussion in 'General Discussion' started by Jesusfreak, Oct 16, 2005.

  1. Jesusfreak

    Jesusfreak Registered

    Joined:
    Oct 16, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I attempted to search your FAQ, but there was an internal error, so I decided to post it here.

    I am having a problem with users stealing my codes, is there a way that I can make it so no one can view my script. I have uploaded the script as a .js document on my cpanel hosting place. I want to make it so no one can view it by going to the source and make it so it can only work on one site, namely http://sev6.proboards31.com.

    If you need my website URL, for any reason, it is www.digital-inflection.com

    I look forward to some aide!
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    In short, no. The visitors browser needs to be able to read the file to render the code ans so it is viewable to anyone.

    You should really put such questions to your web hosting provider as they are in the best place to help you as a web hosting client.
     
  3. Jesusfreak

    Jesusfreak Registered

    Joined:
    Oct 16, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I apologize, I thought that this would be the best place for it. Thanks for your support.
     
  4. Mini

    Mini Well-Known Member

    Joined:
    Mar 4, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    What type of script is it?

    Mini
     
  5. thekonqueror

    thekonqueror Member

    Joined:
    Aug 6, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    If you wish, I can encrypt the script ( I understand it is javascript, not PHP ), so only browser will be able to run the script, and what everyone else will see is something like this:

    i%3D0%3Bi%3Cphotos.length%3Bi++%29%7B%0D%0Apreloadedimages%5Bi%5D%3Dnew%20I
    mage%28%29%0D%0Apreloadedimages%5Bi%5D.src%3Dphotos%5Bi%5D%0D%0A%7D%0D%
    0A%0D%0A%0D%0Afunction%20applyeffect%28%29%7B%0D%0Aif%20%28document.all%20
    %26%26%20photoslider.filters%29%7B%0D%0Aphotoslider.filters.revealTrans.

    PM me if u r interested.
     
    #5 thekonqueror, Oct 18, 2005
    Last edited: Oct 18, 2005
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's encoding, not encrypting. It's a simple matter of decoding it to see what it is doing, then. You cannot encrypt anything on a page that is to be displayed within a browser since the only encryption that browsers understand is SSL. So, encoding can obfuscate wheat you're doing, but it is still trivial to decode.
     
  7. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    Now, now, Chirpy,

    While JS and HTML can not truly be encrypted to prevent visitors from viewing site source code, there are ways to present one's site so that no visitor can leach your code, and I am truly shocked that you have not mentioned any alternative solutions ;)

    One such resource/tool would be to Flash your entire website, or at least the "sensitive" pages.

    Very hard to rip-off and steal code from a swf file.

    As well :eek: , one could present all of their site's content as images :D
     
  8. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0

    Hehe, i can see your script and code and now i can steal it. For what reason? Why would anyone want to?
     
  9. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    One way of 'hiding' a JScript is to put it in a directory and call the script from there.
    Example:
    Put the script yourscript.js into a directory off the web root called jscripts and enter the following code into your index.html file where you would normally insert the raw code for execution. The server looks for the script in the directory and executes it with out needing the raw code in the html.
    Code:
    <script type="text/javascript" src="jscripts/yourscript.js"></script>
    Always include an empty/blank index.html in the jscript directory to deter directory snooping. :)

    You can even call a JScript from another web site or server to display on your site as I found you already had in your home page at http://www.digital-inflection.com/wordpress/
    The raw code is no where to be seen in the source code of your site.
    Code:
    <script src="http://digital-inflection.com/wordpress/wp-content/themes/jakedahn/js_quicktags-mini.js" type="text/javascript"></script>
    The down side is that if someone really wanted to read your script they could enter the url in their browser, like the one above, and read the raw script anyway. :rolleyes:

    There is always this prog that seems to do a fairly good job for a reasonable price and is shareware - try before you by - 30 days or 30 script conversions. :)

    Scripts Encryptor (ScrEnc)
     
    #9 Izzee, Oct 19, 2005
    Last edited: Oct 19, 2005
Loading...

Share This Page