SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Firebug showing Obfuscated code?

    Hi all,

    I noticed on the "script" menu for firebug when I click "show static and eval scripts" you can see my entire JS code un-obfuscated by firebug. The default option is just "show static scripts" which shows my code as it is - obfuscated.

    I was quite frankly horrified to discover this after shelling out on software to protect my work. Does anyone have any idea how I can stop firebug from showing this? Is it because im calling eval a couple times throughout the script?

    Thankyou.

  2. #2
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    Obfuscated client-side code is only difficult to read--not impossible. Obfuscation can be reversible, as you've discovered. Compression also makes the code harder to read, but again, not impossible.

    Encrypted source code, on the other hand, is not readable and must be decoded at runtime. Unfortunately, this is not available for client-side code--only server-side.

    Note that obfuscation can lead to errors and bugs that browsers wouldn't know how to interpret. Compression, on the other hand, is generally recommended for decreasing the size of javascript files.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by johnuk View Post
    I was quite frankly horrified to discover this after shelling out on software to protect my work. Does anyone have any idea how I can stop firebug from showing this? Is it because im calling eval a couple times throughout the script?
    You can't stop firebug from showing this. As Force Flow states, you cannot securely hide your JS code from visitors.

    I'd suggest you ask for your money back.

    To be honest though, if you don't want people reading your JS then you shouldn't really be publishing it on the internet...

  4. #4
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,100
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Firebug will show how it is actually rendered in a nice readable format. I found that out a few days ago trying to be sneaky
    What I lack in acuracy I make up for in misteaks


Bookmarks

Posting Permissions

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