The Spanner logo
    • Home
    • Blog
      • Blog home
      • RSS
    • Login
    • Home
    • Blog
      • Blog home
      • RSS
    • Login
    The Spanner logo

    The Spanner
    Web security blog

    Made by Gareth Heyes
    Follow me on Twitter: @garethheyes

    Javascript for hackers!

    Hackvertor logo
    Shazzer logo
    My Github account
    Recent posts
    Introducing Feedworm: A Privacy-First RSS Reader That Lives in DevToolsSpeedy RSVP extensionAutoVaderHackvertor history and tag finderShadow Repeater v1.2.3 releaseBurp Hackvertor v2.1.24 releaseHacking roomsXSSing TypeErrors in SafarivalueOf: Another way to get thisMaking the Unexploitable Exploitable with X-Mixed-Replace on FirefoxThe curious case of the evt parameterCSS-Only Tic Tac Toe ChallengeRewriting relative urls with the base tag in SafariBypassing DOMPurify with mXSSNew IE mutation vectorHow I smashed MentalJSMentalJS DOM bypassAnother XSS auditor bypassXSS Auditor bypassBypassing the IE XSS filterUnbreakable filterMentalJS bypassesmXSSJava SerializationBypassing the XSS filter using function reassignmentRPOSandboxed jQueryX-Domain scroll detection on IE using focusEpic fail IEnew operatorDecoding complex non-alphanumeric JavaScriptHacking FirefoxDOM ClobberingBypassing XSS AuditorThe evolution of codeNon-Alpha PHP in 6-7 charsetTweetable PHP-Non AlphaMentalJS for PHPOpera x domain with video tutorialSandboxing and parsing jQuery in 100ms

    Javascript vbscript challenge

    By Gareth Heyes (@hackvertor)

    Published 17 years 7 months ago • Last updated March 22, 2025 • ⏱️ < 1 min read

    ← Back to articles

    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:-

    <pre lang="vbscript"> <script type="text/vbscript"> Your vbscript code here </script> <script type="text/javascript"> Your javascript code here </script> </pre>

    ← Back to articles