project 'never sleep at night'

gav on 2002-07-08T23:45:38

I've been working on a project that basically needs to do some trickery one a page we have no control over. We can only insert some text at the top and add a few extra fields etc. Now, luckily as it doesn't do any HTML escaping I've come up with this solution:

  1. Script uses W3C DOM to parse the page and work out some bits of information we've cleverly hidden in some white on white text
  2. Script writes out a <script> tag to load an external Javascript file which is actually a perl script which queries a database and returns some arrays
  3. Script writes out Javascript which calls a script in the main script that writes some more stuff to the page
Now that's scary, I feel quite dirty now :)