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

    Online Javascript LAN scanner

    By Gareth Heyes (@hackvertor)

    Published 18 years 10 months ago • Last updated March 22, 2025 • ⏱️ 2 min read

    ← Back to articles

    Background

    I've really enjoyed making this tool, it started off as a port scanner then it evolved into a router scanner and now I've decided to accept any device on a LAN. The code now works on Firefox and IE7 (which was a pain), I haven't managed to test it on any other browser so please leave a comment if you find any problems.

    Technical details

    The script now places images and iframes directly in the document to allow IE7 to use the onload handler, it wasn't easy however because blank objects call the onload function so I had to create handlers for them. It basically sets a init flag when a image or iframe is ready to be used.

    The scanner accesses a IFrame to perform a generic scan of the network for known default router IP's, once a connection has been made it then passes the IP address and performs a lookup of routers/devices based on that address. The reason I have decided to do this is because I wanted the scanner to grab as many devices as possible because it will be impossible to finger print everything.

    Once a IP address has been found it passes this to the finger printing function which uses a image object to make a connection to the device to see if the finger printing graphic is there.

    Performance

    IE7 is super quick to scan, I think this is because timed out connections don't affect good connections but Firefox seems to take longer, this could be my code as I've not had a chance to make sure it is performing at it's best.

    I feel like a Javascript ninja now, I have trained well :)

    See it in action

    Javascript LAN scanner

    ← Back to articles