Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Re: Javascript Obfuscator problem Date: Tue, 25 Jun 2013 08:51:09 -0600 Lines: 50 Message-ID: References: X-Trace: individual.net MQC5xM2rKKDCBTtTCcxoYg2dUqBUOIpeCFwOYXvY9htMwnhV2d Cancel-Lock: sha1:Dh7W4LbvIipkEQGzVkrrU1YFDDs= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Xref: csiph.com comp.lang.javascript:20431 Stefan said: "> I'm not familiar with the JScriptProtector and JScriptCodeDom classes; a > quick search on the web only shows other error messages like yours. My > guess is that this obfuscator is using a home-brew parser that can't > handle assignment lists as the first expression in |for|. > > This will avoid the parser error: > > cells = tables[i].rows[0].cells; > nlen2 = cells.length; > for (j = 0; j < nlen2;++j) { // ... > > And so do obvious syntax errors: > > var f o o = 4 2; > > (Result: "var _0x1d51=[];var f;o;o=4;21;") > >> Any guesses here (or is there an error my pea-brain can't find in that >> line ) ?? > > Your code is fine (assuming those variables are declared somewhere in > the original code). You can either change your source to make the > obfuscator happy, or use a different obfuscator. Yes, the vrbls are of course defined higher-up. btw, I'm starting to deliberately use my own 'hoisting' techniques. But maybe that's not adviseable. > > That said, why are you even using an obfuscator? The only good reason > (for carefully selected values of "good") that comes to my mind is to > evade detection by security software. Every other use is misguided and > counter-productive, IMHO. This includes "I don't want other people to > see/copy my code without permission". I'm just on a 'learning exercise', and thinking of perhaps obfuscating the data (in the internal tables) of my pages. This has nothing to do with JS, but, as I said, I'm just trying to get a bit of knowledge about obfuscation techniques for later in my development. I'll be looking around (a few months from now) about how to encrypt table data, so that the client browser shows the info correctly, but the 'sniffer' of the table data has a difficult time de-obfuscating. Thanks for the response. -Mel