Not sure if this post is quite appropriate for this list but wasn''t sure where else to ask. I''m using mechanize to visit some pages that have obfuscated javascript and I''m wondering if there''s some ruby or mechanize way to deobfuscate it or otherwise interact with the html elements which are being obfuscated by javascript. For more background, please see http://www.labnol.org/software/deobfuscate-javascript/19815/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/mechanize-users/attachments/20111229/14b3aceb/attachment.html>
On Dec 29, 2011, at 7:33 AM, shig odani wrote:> Not sure if this post is quite appropriate for this list but wasn''t sure where else to ask. I''m using mechanize to visit some pages that have obfuscated javascript and I''m wondering if there''s some ruby or mechanize way to deobfuscate it or otherwise interact with the html elements which are being obfuscated by javascript. > > For more background, please see http://www.labnol.org/software/deobfuscate-javascript/19815/Without a Ruby JS interpreter with a DOM you won''t be able to run javascript from the web like a browser. This is an ambitious project and nobody has yet completed it. In the mean time you can download the javascript the page links to and pass it through jsbeautifier.org (using mechanize) to have something you can read to figure out what to make mechanize do.
On 29/12/11 15:33, shig odani wrote:> Not sure if this post is quite appropriate for this list but wasn''t sure > where else to ask. I''m using mechanize to visit some pages that have > obfuscated javascript and I''m wondering if there''s some ruby or > mechanize way to deobfuscate it or otherwise interact with the html > elements which are being obfuscated by javascript. > > For more background, please see > http://www.labnol.org/software/deobfuscate-javascript/19815/Take a look at Culerity. -- Alex