Port Scanner
Check if common or custom ports are open on a host. Useful for network diagnostics and server setup verification.
2280443

Utilities

Port Scanner

Check if common or custom ports are open on a host.

Port Scanner probes whether common or custom ports appear open on a host you specify. This is a network tool: every check is an outbound fetch (method HEAD, mode 'no-cors') from your browser directly to http(s)://host:port — no first-party server is involved, and the target host sees your IP. Because browsers cannot open raw TCP sockets, this is not a SYN scanner: statuses are inferred from whether the fetch succeeds, times out (3000ms AbortController), or fails early.

Pick from ten Common Ports chips (HTTP 80, HTTPS 443, SSH 22, FTP 21, SMTP 25, DNS 53, MySQL 3306, PostgreSQL 5432, Redis 6379, MongoDB 27017 — 80/443/22 preselected), add custom ports 1–65535, then "Scan {n} Port(s)". Results stream in batches of 5 into a Status / Port / Host / Response Time table with open/closed/filtered legend counts, ready to copy as {host}:{port} — {status} ({ms}ms) lines.

How it works

checkPort(host, port, timeout=3000) in lib/portScanner.ts builds http(s)://host:port (https only for ports 443/8443 via getProtocolForPort) and runs fetch(..., { method: 'HEAD', mode: 'no-cors', signal }) with an AbortController timer. Success → open; AbortError → filtered; a network error before 50% of the timeout → closed, else filtered. responseTime is a performance.now() delta.

scanPorts processes batches of 5 concurrent checks with an onProgress callback, streaming each result into Redux via portResultAdded before the final resultSet — so the table fills progressively while "Scanning..." shows. Selection state and results live in portScannerSlice; zod validates that a host is present and at least 1 port is selected. All probes go from your browser to the target host — outbound network traffic to the host you enter.

How to use

  1. Step "Input" — enter Host / Domain (placeholder "e.g. example.com or 192.168.1.1"); empty → toast "Please enter a host".
  2. Toggle Common Ports chips (initial selection: 80, 443, 22).
  3. Optionally add a Custom Port (1–65535) via "Add" — invalid values toast "Invalid port number (1-65535)".
  4. Review selected-port chips; remove any with the × control.
  5. Click "Scan {n} Port(s)" (button shows "Scanning..."; toast "Scanned {n} port(s)!" on completion).
  6. Watch progressive results — batches of 5, 3000ms timeout per port.
  7. Read legend counts (open / closed / filtered) + the table (status/port/host/response ms), sorted by port.
  8. "Copy" results as {host}:{port} — {status} ({ms}ms) lines; "Clear" resets ports to 80/443/22.

Tips

  • Browser constraints: only ports reachable via HTTP(S) fetch respond — non-HTTP ports often show closed/filtered because there is no raw TCP.
  • 3000ms timeout per port; "closed" is inferred when the failure happens before 1.5s (50% of timeout), slower failures count as filtered.
  • https scheme is used only for 443/8443 (getProtocolForPort); other ports probe over http.
  • Results stream live via portResultAdded before the final resultSet — you see rows appear mid-scan.
  • Probes leave your browser and hit the target host directly — scan only hosts you own or have permission to test.

Port Scanner FAQ

Is this a real TCP SYN scanner?

No — it probes with fetch HEAD + no-cors (browser sandbox); open/closed/filtered statuses are inferred from fetch success, timeout, or failure.

What's the timeout?

DEFAULT_TIMEOUT is 3000ms per port; the scan runs 5 ports concurrently per batch.

Which ports are pre-defined?

COMMON_PORTS: 80, 443, 22, 21, 25, 53, 3306, 5432, 6379, 27017 — with 80, 443, and 22 selected by default.

What does filtered mean?

An AbortError (timeout) or a network failure that took ≥ 50% of the 3000ms timeout before erroring.

Where do the probe requests go?

Directly from your browser to the host:port you selected (no-cors HEAD) — no first-party server proxies the scan.

Credits

  • Fetch API (no-cors HEAD) — Port probing in checkPort (lib/portScanner.ts) with AbortController timeouts — outbound probes to the target host
  • Performance API — responseTime measured via performance.now() deltas
ShareTweet
More Utilities

Command Palette

Search for a command to run...