Super N00B question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BJ
    Confirmed User
    • Mar 2002
    • 5590

    #1

    Super N00B question

    One of my sites relies on a .js file to function. Right now anyone can see the .js file. I want to move it to a password protected folder and load it from there. So if anyone tries to see it they can't

    If I password protect a folder via cpanel, put the script in that, how do I get it to load properly?

    Thanks
  • daniel_webcams
    Confirmed User
    • Nov 2008
    • 2491

    #2
    you could do that through a htaccess file.

    Allow and enable access from certain IP (your server IP)

    Say you have a permanent IP and you want to administer the site via /admin and protect the directory from the rest of the world once ‘n’ for all, then you will want the following .htaccess directives:

    order deny, allow
    deny from all
    allow from 12.34.56.78

    I think this is what you need
    (http://www.kavoir.com/2009/01/htacce...ry-access.html)
    Daniel,

    Skype: [email protected]
    ICQ: 354-220-339
    Email: daniel@adultforce[dot]com


    Comment

    • BJ
      Confirmed User
      • Mar 2002
      • 5590

      #3
      thank you sir

      Comment

      • AdultKing
        Raise Your Weapon
        • Jun 2003
        • 15601

        #4
        Does the site rely on the .js file for everybody to use the site ? or just for your use ?

        Comment

        • BJ
          Confirmed User
          • Mar 2002
          • 5590

          #5
          everybody needs it or the site does not work, if someone has java disabled it offers an alternative. I just don't want people looking at the .js file

          Comment

          • AdultKing
            Raise Your Weapon
            • Jun 2003
            • 15601

            #6
            If everybody needs to use the .js file for it to work, then putting it in a password protected area will prevent browsers from loading it, thus the site will not work.

            Comment

            • AdultKing
              Raise Your Weapon
              • Jun 2003
              • 15601

              #7
              Stackoverflow reference:

              http://stackoverflow.com/questions/1...avascript-code

              Comment

              • cam_girls
                So Fucking Banned
                • Apr 2009
                • 2968

                #8
                you can't hide a client side script

                Comment

                • HomerSimpson
                  Too lazy to set a custom title
                  • Sep 2005
                  • 13826

                  #9
                  Originally posted by cam_girls
                  you can't hide a client side script
                  right...
                  you can just encode it somehow...
                  but it can be decoded eventually
                  Make a bank with Chaturbate - the best selling webcam program
                  Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

                  PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

                  Comment

                  • woj
                    <&(©¿©)&>
                    • Jul 2002
                    • 47882

                    #10
                    you can make it harder, but you won't be able to hide it completely...
                    Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                    Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                    Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                    Comment

                    • twistedkinkcash
                      Registered User
                      • Apr 2011
                      • 58

                      #11
                      This is the internets..srs bsnss
                      Affiliate Manager for

                      8 Fetish Niche Sites * 50% Payouts * Lifetime Recurring Payouts * 100% Exclusive Fetish Content
                      ICQ #603114806

                      Comment

                      • raymor
                        Confirmed User
                        • Oct 2002
                        • 3745

                        #12
                        Originally posted by HomerSimpson
                        right...
                        you can just encode it somehow...
                        but it can be decoded eventually
                        And decoding it is always trivial. All one must do is replace "eval" with "alert" and it will pop up a box with the full code.
                        Some encoders may require that "eval" be replaced with "alert" more than once, but they are all trivial.

                        if someone has java disabled it offers an alternative. I just don't want people looking at the .js file
                        "fart" and "fort" are two words that sound similar, but otherwise are completely unrelated.
                        Similarly, "JavaScript" and "Java" are two completely unrelated things created at different times
                        by different companies. The people selling LiveScript renamed it "JavaScript" because at the
                        time Java was a hot buzzword. It's the same thing as Xbox 360, Anderson Cooper 360,
                        Symantec Norton 360, Nordic Track 360 etc.

                        In other words, turning off Java affects your JavaScript just as much as turning off your XBox
                        affects Anderson Cooper - not at all, even though they both have "360" in their name.
                        For historical display only. This information is not current:
                        support&#64;bettercgi.com ICQ 7208627
                        Strongbox - The next generation in site security
                        Throttlebox - The next generation in bandwidth control
                        Clonebox - Backup and disaster recovery on steroids

                        Comment

                        • TripleXPrint
                          Confirmed User
                          • Apr 2007
                          • 983

                          #13
                          Originally posted by raymor
                          In other words, turning off Java affects your JavaScript just as much as turning off your XBox affects Anderson Cooper - not at all, even though they both have "360" in their name.
                          I laughed. Good analogy.
                          Skype: Triplexprint

                          Comment

                          Working...