Shameel Arafin on 29 May 2006 18:55:37 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] executing javascript?


Also, there's a sophisticated Firefox _javascript_ debugger called Venkman available as an extension ( http://www.mozilla.org/projects/venkman/)

S/


On 5/29/06, sean finney < seanius@seanius.net> wrote:
hi eric,

On Mon, May 29, 2006 at 12:20:20PM -0400, Eric wrote:
> Does anyone know of a way to execute _javascript_ outside of a browser?

never done it myself, but the libjavascript-perl package looks
promising, as does rhino and ngs-js (i know none of these programs,
just the output of "apt-cache search _javascript_").

> I have a bit of suspect _javascript_ that I'd like to execute and see
> what it is actually telling the browser.  The "view source" option
> shows me this:
>
> <script>
> <!--
> document.write(unescape("%3Cstyle%20type%3D%22text/css%22.......
> //-->
> </script>
>
> If I could get _javascript_ to just run and redirect it's output to a
> file then I could see what it's hiding in all the %nn's

i think some clever observation would narrow the scope of your
problem and not require a _javascript_ engine:

- you may notice the ascii strings in there look like something that
  would be in an html document.
- %NN, where NN is a hexadecimal byte, is a common way of escaping non
  alphanumeric characters.  for example, 0x3c is '<' ...
- a couple minute's hacking could get you a script to "decipher" the
  whole string.  for example,
        cat $file | sed -e 's/%\([0-9A-F][0-9A-F]\)/" . chr(0x\1) ."/g'
  will output something that with just a bit of massaging could be made
  into a perl script.  there are probably better ways too :)


        sean


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEeyefynjLPm522B0RApxqAJ9e5VzqB4kvZySqpZcLd3BG8PJJSwCdEzhH
HAbohr/qabGwYv0Q268ryKk=
=XpKD
-----END PGP SIGNATURE-----


___________________________________________________________________________
Philadelphia Linux Users Group         --         http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug