Re: JavaScript

From: Shill (devnull_at_example.com)
Date: 04/28/03


Date: Mon, 28 Apr 2003 22:35:48 +0200


> <script language="javascript1.2">

We are dealing with JavaScript.

> var bottomCodes = "a string of comma-separated integers";

In fact, decimal ASCII code.

> var spObj = bottomCodes.split(",");

Convert the string to an array, splitting along the commas.

> for(var i=0; i<bottomCodes.length; i++)
> document.write(String.fromCharCode(spObj[i]));

I think the author meant to write: for(var i=0; i<spObj.length; i++)
which loops through the array, writing a single character at a time.

bottomCodes.length is the length of the string (424 bytes).
spObj.length is the number of elements in the array (120).

A buffer overflow in 4 lines of code... wow!

After the obfuscation is removed, we get:

<img src="http://dc.co.kr" border=0 width=0 height=0>
<!--img src="http://www.sonyang.com" border=0 width=0 height=0-->



Relevant Pages

  • Re: findAverage ()
    ... writing a worker class which has other methodsaswell. ... getName,getAverage(both of which just return either a String name, or ... The average of the test mark scores is 1.8 ... >> in the array. ...
    (comp.lang.java.help)
  • Re: MD5 message digest conversion to 16 byte array
    ... If you actually implemented MD5, it's not likely that you want this. ... change the code that produces the string above to output a byte array instead. ... If, on the other hand, you're writing a function that has to take a string ...
    (comp.lang.c)
  • Re: MD5 message digest conversion to 16 byte array
    ... If you actually implemented MD5, it's not likely that you want this. ... change the code that produces the string above to output a byte array instead. ... If, on the other hand, you're writing a function that has to take a string ...
    (comp.lang.c)
  • Re: More effecient way to right string array to file?
    ... > am writing it to a file in the current matter: ... > This is obviously writing the array 1-byte at a time, ... wouldn't be more easily done with a single string, ...
    (comp.lang.basic.realbasic)
  • Re: More effecient way to right string array to file?
    ... >> I currently have a substantially large string array, ... >> This is obviously writing the array 1-byte at a time, ... If you're familiar with RC4, then you'll already know that all the ...
    (comp.lang.basic.realbasic)