Obscuring/hiding Javascript / pagecontents

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pjotr Wedersteers

    #1

    Obscuring/hiding Javascript / pagecontents

    I am new to J(ava)Script, use PHP a lot and consider moving some stuff for a
    project over to the client side. Problem is part of the PHP code is
    copyrighted and the author would not be happy to see his work made available
    to the world. Guess he is entitled to that opinion.

    Is it possible to hide javascript and/or html data from the user or is the
    only way to make it hard to get by obscuring it through removing
    indentation, variable renaming and such? Or is the alternative pouring the
    code in Flash or Java ? (is a Flash movie or JAR file safe from snooping
    eyes ?)

    Any pointers and tips are very welcome.

    TIA
    Pjotr

    --
    The day Microsoft starts making stuff that does not suck will undoubtedly be
    the day they start producing vacuum cleaners



  • Andrew Thompson

    #2
    Re: Obscuring/hiding Javascript / pagecontents

    On Sat, 6 Nov 2004 17:54:25 +0100, Pjotr Wedersteers wrote:
    [color=blue]
    > Is it possible to hide javascript ..[/color]

    No.
    [color=blue]
    >..and/or html data ..[/color]

    No.
    [color=blue]
    >..from the user or is the
    > only way to make it hard to get by obscuring it through removing
    > indentation, variable renaming and such?[/color]

    Obfuscation, yes. But that only works if the code is not
    a) worth stealing or b) easier to rewrite.
    [color=blue]
    >..Or is the alternative pouring the
    > code in Flash or Java ? (is a Flash movie or JAR file safe from snooping
    > eyes ?)[/color]

    No and no. (Though Java can also be obfuscated,
    not sure about Flash)
    [color=blue]
    > Any pointers and tips are very welcome.[/color]

    If it is really so valuable, keep it on the server.

    --
    Andrew Thompson
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.PhySci.org/ Open-source software suite
    http://www.1point1C.org/ Science & Technology
    http://www.LensEscapes.com/ Images that escape the mundane

    Comment

    • McKirahan

      #3
      Re: Obscuring/hiding Javascript / pagecontents

      "Pjotr Wedersteers" <pjotr@wederste ers.com> wrote in message
      news:418d01ad$0 $78749$e4fe514c @news.xs4all.nl ...[color=blue]
      > I am new to J(ava)Script, use PHP a lot and consider moving some stuff for[/color]
      a[color=blue]
      > project over to the client side. Problem is part of the PHP code is
      > copyrighted and the author would not be happy to see his work made[/color]
      available[color=blue]
      > to the world. Guess he is entitled to that opinion.
      >
      > Is it possible to hide javascript and/or html data from the user or is the
      > only way to make it hard to get by obscuring it through removing
      > indentation, variable renaming and such? Or is the alternative pouring the
      > code in Flash or Java ? (is a Flash movie or JAR file safe from snooping
      > eyes ?)
      >
      > Any pointers and tips are very welcome.
      >
      > TIA
      > Pjotr[/color]

      Can you use ASP?

      You can name JavaScript "include" files with an ".asp" extension to hide
      them from view.

      For example, <script type="text/javascript" src="yourcode.a sp"></script>


      Comment

      • Randy Webb

        #4
        Re: Obscuring/hiding Javascript / pagecontents

        McKirahan wrote:[color=blue]
        > "Pjotr Wedersteers" <pjotr@wederste ers.com> wrote in message
        > news:418d01ad$0 $78749$e4fe514c @news.xs4all.nl ...
        >[color=green]
        >>I am new to J(ava)Script, use PHP a lot and consider moving some stuff for[/color]
        >
        > a
        >[color=green]
        >>project over to the client side. Problem is part of the PHP code is
        >>copyrighted and the author would not be happy to see his work made[/color]
        >
        > available
        >[color=green]
        >>to the world. Guess he is entitled to that opinion.
        >>
        >>Is it possible to hide javascript and/or html data from the user or is the
        >>only way to make it hard to get by obscuring it through removing
        >>indentation , variable renaming and such? Or is the alternative pouring the
        >>code in Flash or Java ? (is a Flash movie or JAR file safe from snooping
        >>eyes ?)
        >>
        >>Any pointers and tips are very welcome.
        >>
        >>TIA
        >>Pjotr[/color]
        >
        >
        > Can you use ASP?
        >
        > You can name JavaScript "include" files with an ".asp" extension to hide
        > them from view.
        >
        > For example, <script type="text/javascript" src="yourcode.a sp"></script>[/color]

        That does absolutely *nothing* for hiding script contents. Its as simple as:

        view-source:Absolute URLToTheASPFile .asp


        --
        Randy
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        • McKirahan

          #5
          Re: Obscuring/hiding Javascript / pagecontents

          "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
          news:5p6dnYq418 0c6xDcRVn-sg@comcast.com. ..
          [color=blue][color=green]
          > > You can name JavaScript "include" files with an ".asp" extension to hide
          > > them from view.
          > >
          > > For example, <script type="text/javascript" src="yourcode.a sp"></script>[/color][/color]
          [color=blue]
          > That does absolutely *nothing* for hiding script contents. Its as simple[/color]
          as:[color=blue]
          >
          > view-source:Absolute URLToTheASPFile .asp
          >
          > --
          > Randy
          > comp.lang.javas cript FAQ - http://jibbering.com/faq[/color]

          Thanks for the info -- there's a lot to learn in!


          Comment

          • John Postlethwait

            #6
            Re: Obscuring/hiding Javascript / pagecontents


            Pjotr Wedersteers wrote:[color=blue]
            > Is it possible to hide javascript and/or html data from the user or[/color]
            is the[color=blue]
            > only way to make it hard to get by obscuring it through removing
            > indentation, variable renaming and such? Or is the alternative[/color]
            pouring the[color=blue]
            > code in Flash or Java ? (is a Flash movie or JAR file safe from[/color]
            snooping[color=blue]
            > eyes ?)[/color]

            Encrypt html source code. Protect website content. Encryption of html,asp,javascript. Image protection

            You can encrypt Javascript using that above link. I have not actually
            used it, but I have seen it reccomended a few times in the newsgroups.

            Comment

            • McKirahan

              #7
              Re: Obscuring/hiding Javascript / pagecontents

              "John Postlethwait" <john.postlethw ait@gmail.com> wrote in message
              news:1099866778 .867349.58270@f 14g2000cwb.goog legroups.com...[color=blue]
              >
              > Pjotr Wedersteers wrote:[color=green]
              > > Is it possible to hide javascript and/or html data from the user or[/color]
              > is the[color=green]
              > > only way to make it hard to get by obscuring it through removing
              > > indentation, variable renaming and such? Or is the alternative[/color]
              > pouring the[color=green]
              > > code in Flash or Java ? (is a Flash movie or JAR file safe from[/color]
              > snooping[color=green]
              > > eyes ?)[/color]
              >
              > http://www.encrypt-html.com/encrypt_javascript.htm
              > You can encrypt Javascript using that above link. I have not actually
              > used it, but I have seen it reccomended a few times in the newsgroups.
              >[/color]

              Won't it require installation on the Web server (who most hosts won't do!)?


              Comment

              • Ira Baxter

                #8
                Re: Obscuring/hiding Javascript / pagecontents

                "Pjotr Wedersteers" <pjotr@wederste ers.com> wrote in message
                news:418d01ad$0 $78749$e4fe514c @news.xs4all.nl ...[color=blue]
                > I am new to J(ava)Script, use PHP a lot and consider moving some stuff for[/color]
                a[color=blue]
                > project over to the client side. Problem is part of the PHP code is
                > copyrighted and the author would not be happy to see his work made[/color]
                available[color=blue]
                > to the world. Guess he is entitled to that opinion.
                >
                > Is it possible to hide javascript and/or html data from the user or is the
                > only way to make it hard to get by obscuring it through removing
                > indentation, variable renaming and such? Or is the alternative pouring the
                > code in Flash or Java ? (is a Flash movie or JAR file safe from snooping
                > eyes ?)
                >
                > Any pointers and tips are very welcome.[/color]

                For JavaScript, since the client side code must be delivered to the client,
                in essence you are delivering source code to him.
                "Encoding" this source won't help much, because
                you'll also have to send the encoder to the client.

                Obfuscation is the only practical technical defense;
                at least you are delivering source code which is difficult
                to reverse engineer. As others have said, if you
                are sending a trivial amount of code, even this won't
                help. If you send a large amount of code, this
                can be pretty good. YMMV.

                See
                http://www.semanticdesigns.com/Produ...bfuscator.html.

                If this isn't strong enough, you'll have to convert your code
                to some kind of real object code (JAR/SWF files can be reverse
                engineered too, consequently you see obfuscators being
                offered for them, too)., and then convince your client to run
                it. Viruses being such things, he may be hard to convince.

                --
                Ira D. Baxter, Ph.D., CTO 512-250-1018
                Semantic Designs, Inc. www.semdesigns.com


                Comment

                • Andrew Thompson

                  #9
                  Re: Obscuring/hiding Javascript / pagecontents

                  On Mon, 8 Nov 2004 18:18:25 -0600, Ira Baxter wrote:
                  [color=blue]
                  > If this isn't strong enough, you'll have to convert your code
                  > to some kind of real object code (JAR[/color]

                  Nit-pick. A Jar file is really a Zip file (try renaming
                  one - a double click will open it in WinZip or similar).

                  It is the Java .class files inside the jar file that might be obfuscated.
                  [color=blue]
                  > .../SWF files can be reverse
                  > engineered too, consequently you see obfuscators being
                  > offered for them, too)[/color]

                  --
                  Andrew Thompson
                  http://www.PhySci.org/codes/ Web & IT Help
                  http://www.PhySci.org/ Open-source software suite
                  http://www.1point1C.org/ Science & Technology
                  http://www.LensEscapes.com/ Images that escape the mundane

                  Comment

                  Working...