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 port scanner

    By Gareth Heyes (@hackvertor)

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

    ← Back to articles

    I was pretty bored yesterday and I found my work a bit too easy so I thought I'd have a go at something different.

    I decided to create a javascript port scanner, the scanner only works on Firefox at the moment (I may change it to work in other browsers) and has three options, option one scans for a local FTP server, option two scans for a local web server and the third option does a NAT router scan and guesses which type of router you have.

    It assumes that you haven't changed the default configurations and supports a few models of routers. Check it out below:-

    Update...

    I've added a bunch of default gateway addresses to my scanner and it should now display the host as well on the NAT router scan. The script has been updated to allow router submissions and I have removed the localhost web server scanner and localhost ftp server scanner because I found them less interesting than the NAT scanner.

    Technical details

    The scanner object takes a list of router objects from the arguments of the function and then performs a scan of each of the routers. It creates a iframe to do this, using the onload handler to check if it was successful.

    Javascript NAT router scan demo

    ← Back to articles