Whilst hacking away in javascript I was experimenting with various things and I thought of a problem which would make a good challenge.
The idea was to produce some vbscript which executed the msgbox function without using parenthesis but the trick was not to raise a syntax error in javascript when parsing the code. I found a cool solution to this but lets see what you can come up with. Here are the main rules:-
Rules
1. No parenthesis may be used.
2. The vbscript version must execute msgbox with a argument of 1.
3. No syntax errors in either vbscript or jscript.
4. Errors can’t be turned off, using window.onerror for example is not allowed.
5. Both code samples must work in IE7.
6. The javascript and vbscript code should be identical.
In order to win the challenge you must provide the correct code which executes within the following tags:-
<script type="text/vbscript"> Your vbscript code here </script> <script type="text/javascript"> Your javascript code here </script>




Comments 9
”
Posted 10 Nov 2008 at 12:59 am ¶MsgBox 1′
Any way to preserve formatting and JS comments? Let’s try this way…
Posted 10 Nov 2008 at 1:00 am ¶<pre>
”
MsgBox 1′
</pre>
OK,
Posted 10 Nov 2008 at 1:04 am ¶unescape(
“%27%27%0AMsgBox%201%27″
)
Sorry Giorgio my bad commenting in my blog, nice one! It was a sub challenge hehe
Posted 10 Nov 2008 at 10:11 am ¶Hmmmm tried it in IE7 and it causes syntax errors. Close but not correct.
You can submit entries here:-
Posted 10 Nov 2008 at 2:54 pm ¶http://sla.ckers.org/forum/read.php?2,25291
Gareth, did you decode it correctly?
Posted 10 Nov 2008 at 4:25 pm ¶Here’s the code above live, tested in IE8 both in standard and compatibility mode:
http://evil.hackademix.net/test/vbjs.html
OK, I tried to unescape my code above: your *ckying SpamBam elided the JS c-style comments once more, even if they were url-escaped
Posted 10 Nov 2008 at 4:28 pm ¶Ah-ha sorry again, that is a correct answer
Posted 10 Nov 2008 at 4:47 pm ¶Will this one pass through SpamBam?
Posted 10 Nov 2008 at 6:37 pm ¶‘\
MsgBox 1′
Post a Comment