[thelist] how do we hide contents? Challenge!!

Aleem Bawany aleem.bawany at utoronto.ca
Tue Dec 10 17:58:01 CST 2002


This is what I have so far:
------------------------------
  for(_i=0;_i<_c.length;_i++ ) {
	if(_i%3==0)
		_d += "%";
	else
		_d += _c.charAt(_i);

  }

// added the document.write to get the next segement of code...
// (took off eval)
document.write(unescape(_d));


// and here's the next maze
function _x(s) {
	s=unescape(s);
	t=Array();
	t[0]="";
	j=0;
	for (i = 0; i < s.length; i++)
		{t[j]+=String.fromCharCode(s.charCodeAt(i) + (i%2==0 ? 1
: -1));
		if((i+1)%30==0){
			j++;
			t[j]="";
		}
	}
	document.write=_dw;
	u="";

[...]
------------------------------------
this is where my patience runs out b'cos the code on his site is not
worth stealing anyways.

Basically, he/she ASCII encoded the functions, so first you need to
ascii decode them. The decoded functions reveal how the next segement of
code is encoded.

In the first loop every third character is switched to a % sign in the
variable _c giving you something like %32%34%83%40.... which is again
ASCII encoding, so you write it to the document, grab that and run an
ascii decoder on it again... and then you get the next function...

The next function poses another riddle.... a frustrating and useless
activity. If you really wanted to hide your code, you could put in 10 of
these functions, each calling the next and make it hell for ppl to
decode your site...

It's an interesting approach and I have made a note of it. You gotta
give this guy credit, this is by far the best approach I have seen for
hiding your HTML. He wrote the whole document using javascript, so
basically he's elimnated the problem of ppl viewing the cache, or wget
or other trickery to get at the source. What a waste of my time...

Aleem

http://members.evolt.org/aleem





More information about the thelist mailing list