Git Product home page Git Product logo

Comments (5)

avilum avatar avilum commented on May 25, 2024 1

In chrome it doesn't recognize ports with https, but only with http.
Maybe a different logic will be able to recognize the difference but anyway the answers are masked and not received if the browser is blocking our requests.
0.0.0.0 and 127.0.0.1 will work differently as well, it depends on which host the user is visiting - CORS and CSP, as you said.
This could be fixed 👍

from portsscan.

avilum avatar avilum commented on May 25, 2024 1

Seems like the Issue is fixed,
The build.sh will setup your environment, by copying wasm_exec.js to the project's root.
Then it'll be compatible to your current Go version and OS.

from portsscan.

correabuscar avatar correabuscar commented on May 25, 2024

Note that because of Content Security Policy: Upgrading insecure request in Firefox(likely due to dom.security.https_only_mode being true), I had to replace http with https in target = fmt.Sprintf("https://%s", target) or else Firefox won't send the request to my listening netcat: # while true; do nc -l -p 80 -s 127.0.0.1; echo "------------------$(date)";sleep 1; done

That only happens because you used 0.0.0.0 instead of 127.0.0.1 (I have not tested the truthiness of this in wasm though, but this is true from plain javascript).

``` 16:55:20.011 GEThttps://correabuscar.github.io/wasmlocalscan/index.html [HTTP/2 200 OK 75ms]

16:55:20.128 This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “”.
index.html
16:55:20.174
GEThttps://correabuscar.github.io/wasmlocalscan/wasm_exec.js
[HTTP/2 200 OK 24ms]

16:55:20.199 WebAssembly verbose: async instantiateStreaming() started index.html:7:17
16:55:20.199 WebAssembly verbose: available wasm compilers: tier1=baseline tier2=none index.html:7:17
16:55:20.244
XHRGEThttps://correabuscar.github.io/wasmlocalscan/main.wasm
[HTTP/2 200 OK 180ms]

16:55:20.432
GEThttps://correabuscar.github.io/favicon.ico
[HTTP/2 200 OK 24ms]

16:55:20.499 WebAssembly verbose: new Memory({initial:306 pages}) succeeded
16:55:20.502 WebAssembly verbose: async instantiate succeeded
16:55:20.516 (GO request): &{Method:GET URL:http://0.0.0.0:81 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[js.fetch:mode:[no-cors]] Body: GetBody: ContentLength:0 TransferEncoding:[] Close:false Host:0.0.0.0:81 Form:map[] PostForm:map[] MultipartForm: Trailer:map[] RemoteAddr: RequestURI: TLS: Cancel: Response: ctx:0x410040} wasm_exec.js:51:14
16:55:20.519 (GO request): &{Method:GET URL:http://0.0.0.0:80 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[js.fetch:mode:[no-cors]] Body: GetBody: ContentLength:0 TransferEncoding:[] Close:false Host:0.0.0.0:80 Form:map[] PostForm:map[] MultipartForm: Trailer:map[] RemoteAddr: RequestURI: TLS: Cancel: Response: ctx:0x410040} wasm_exec.js:51:14
16:55:20.567 Content Security Policy: Upgrading insecure request ‘http://0.0.0.0:81/’ to use ‘https’
16:55:20.567 Content Security Policy: Upgrading insecure request ‘http://0.0.0.0/’ to use ‘https’
16:55:20.573
XHRGEThttps://0.0.0.0:81/
16:55:20.574
XHRGEThttps://0.0.0.0/
16:55:20.576 Get "http://0.0.0.0:81": net/http: fetch() failed: NetworkError when attempting to fetch resource. wasm_exec.js:51:14
16:55:20.577 (GO error): Get "http://0.0.0.0:81": net/http: fetch() failed: NetworkError when attempting to fetch resource. wasm_exec.js:51:14
16:55:20.578 81 wasm_exec.js:51:14
16:55:20.580 Get "http://0.0.0.0:80": net/http: fetch() failed: NetworkError when attempting to fetch resource. wasm_exec.js:51:14
16:55:20.580 (GO error): Get "http://0.0.0.0:80": net/http: fetch() failed: NetworkError when attempting to fetch resource. wasm_exec.js:51:14
16:55:20.581 80 wasm_exec.js:51:14
16:55:25.486 Finished. Ports Mapping: wasm_exec.js:51:14
16:55:25.490 Scanned Ports: map[80:false 81:false] wasm_exec.js:51:14
16:55:25.491 Open Ports map[80:false 81:false]

</details>

from portsscan.

correabuscar avatar correabuscar commented on May 25, 2024

With the new wasm_exec.js I keep getting (most of the time):

 Uncaught (in promise) Error: Go program has already exited
    _resume https://correabuscar.github.io/wasmlocalscan/wasm_exec.js:540
    _makeFuncWrapper https://correabuscar.github.io/wasmlocalscan/wasm_exec.js:553

from portsscan.

avilum avatar avilum commented on May 25, 2024

Hey,
Now it works with all go versions, the problem was that build.sh did not copy wasm_exec.js from the go env.
Cay you try it again from master?

from portsscan.

Related Issues (6)

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.