Git Product home page Git Product logo

avilum / portsscan Goto Github PK

View Code? Open in Web Editor NEW
130.0 4.0 23.0 31 KB

A web client port-scanner written in GO, that supports the WASM/WASI interface for Browser WebAssembly runtime execution.

Home Page: http://ports.sh

License: Creative Commons Zero v1.0 Universal

Shell 0.94% HTML 7.72% Go 27.52% JavaScript 63.82%
portscanner security webassembly golang-webassembly localhost fingerprinting knocker port-knock port-knocking port-knocker

portsscan's Introduction

WebAssembly Port Scanner

Written in Go with target WASM/WASI.

Demo:

Watch the live demo on ports.sh

QuickStart

The WASM main function scans all the open ports in the specified range (see main.go), via 0.0.0.0 with no-cors fetch mode in Javascript level.

  • Discovers any TCP open port available on the visiting host.
  • One byte of response / filtered port is enough
  • Scans TCP only (WASM has no UDP support yet)
  • Uses golang 'http' API rather then 'net' API (better browser compatibility)

Setup

Please see ./build.sh

Build and Run

Simply start an HTTP server locally, for example:
python3 -m http.server 5000
Or:
npm i -g serve && serve

portsscan's People

Contributors

avilum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

portsscan's Issues

Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

Hello, I failed.
I compiled the program on CentOS.
GOOS=js GOARCH=wasm go build -o main.wasm
And started the server in this directory.
python3 -m http.server 5000
I'm sure both wasm_exec.js and main.wasm can be accessed.
However, chrome reports an error in the console: Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

`Uncaught (in promise) LinkError: import object field 'runtime.walltime' is not a Function`

In Firefox 106.0.5 (64-bit) on Gentoo ~amd64, go version go1.19.3 linux/amd64, getting this error, seen in devtools:
Uncaught (in promise) LinkError: import object field 'runtime.walltime' is not a Function

Looks like this is why: golang/go@862ddb3

Ah, I guess I just needed to update wasm_exec.js from the original location maybe? https://github.com/golang/go/blob/e18d07ddc5c9005738c3063130f0f5ccf127849e/misc/wasm/wasm_exec.js#L250

error

localhost/:1 Uncaught (in promise) LinkError: WebAssembly.instantiate(): Import #5 module="go" function="runtime.walltime" error: function import requires a callable

Does this still work?

I recently set up the code and ran a sample of this and it seems to not be working on Windows 11/ Chrome 107.0.5304.123. Can anyone else confirm?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.