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

    Hackvertor export API

    By Gareth Heyes (@hackvertor)

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

    ← Back to articles

    I've had requests to create a Hackvertor API to allow you to embed it on your own sites, so I've created one. It uses postMessage to communicate and you can set the width, height, top, left and callback for your output. The code looks like this:-

    <code lang="javascript"> Hackvertor.write({top:'0px',left:'300px',width:'700px',height:'400px', callback:function(str) { document.getElementById('output').value=str; }}); </code>

    This will write a iframe pointing to the Hackvertor export and the callback will retrieve the output. I've done a complete sample to show you how it works:- Hackvertor export example

    The API contains a couple of functions:- Hackvertor.show() - Shows the Hackvertor window Hackvertor.hide() - Hides the Hackvertor window Hackvertor.send(str) - Sends some input to Hackvertor <del datetime="2011-02-03T09:14:34+00:00"> It still doesn't work on Chrome correctly yet as there is a minor JSReg issue I need to sort out, I'll fix that as soon as I've got time</del> fixed!. But anyway enjoy!

    ← Back to articles