This file:
On Tuesday, October 14, 2014 8:55:12 AM UTC-4, tad na wrote:
-- does not appear to me to be "obfuscated" in any way, rather just a string of Unicode characters that look funny in an editor.
I found this line:
punctuation = new RegExp("[" + unicodePunctuationRe + "]", "g")
followed later by this line:
word = word.replace(punctuation, "");
buried deep in the
http://www.jasondavies.com/wordcloud/cloud.js?201402
file, which performs a simple, straightforward, "Remove all Unicode punctuation in string word" operation.
This file, however, is severely obfuscated:
http://www.jasondavies.com/d3.min.js
using many tactics: removing all white space; changing all meaningful user names to one or two letters; adding nonsense functions that have no useful purpose; etc.
Google developer tools has a "pretty code" function built in which will add indentation to the code under study. However, it will do nothing for all the user names being just one or two letters long. Reversing engineering such code is fodder for far more intense, geeky coders than I.
Doing a Google search on the term, "JavaScript obfuscation utilities," should provide you with many candidates for tools to obfuscate your own code
Obfuscation, IMHO, tends to violate the Opensource spirit of JavaScript.
Your mileage, as always, may vary.
On Tuesday, October 14, 2014 8:55:12 AM UTC-4, tad na wrote:
check this out: http://www.jasondavies.com/unicode.js I got it from http://www.jasondavies.com/wordcloud/#%2F%2Fwww. jasondavies.com%2Fwordtree% 2Fcat-in-the-hat.txt Following the code trail, I see the unicode javascript has to do with regex. It looks like the code is obfuscated to the max.1. I did not know that you can hide code in javascript. How is this done?2. how can I undo it to see the regex?Thanks.
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.