Skip to content

Conversation

@lokiee0
Copy link

@lokiee0 lokiee0 commented Oct 9, 2025

  • Add proper tracking of responded vs non-responded ports in SYN scanner
  • Mark ports that don't respond after timeout as filtered (not ignored)
  • Add buffered channels to prevent blocking during port classification
  • Improve connect scanner error classification for filtered ports:
    • Timeouts -> PortFiltered (firewall dropping packets)
    • Connection refused/reset -> PortClosed (host up, port closed)
    • Network unreachable -> PortFiltered (routing/firewall issues)
  • Add comprehensive tests for port state classification
  • Add mutex protection for concurrent port tracking
  • Update README with detailed port state documentation

This ensures all scanned ports are properly classified as open, closed, or filtered, matching nmap's behavior. Previously, non-responding ports in SYN scans were simply ignored instead of being marked as filtered.

Fixes #7

- Add proper tracking of responded vs non-responded ports in SYN scanner
- Mark ports that don't respond after timeout as filtered (not ignored)
- Add buffered channels to prevent blocking during port classification
- Improve connect scanner error classification for filtered ports:
  - Timeouts -> PortFiltered (firewall dropping packets)
  - Connection refused/reset -> PortClosed (host up, port closed)
  - Network unreachable -> PortFiltered (routing/firewall issues)
- Add comprehensive tests for port state classification
- Add mutex protection for concurrent port tracking
- Update README with detailed port state documentation

This ensures all scanned ports are properly classified as open, closed,
or filtered, matching nmap's behavior. Previously, non-responding ports
in SYN scans were simply ignored instead of being marked as filtered.

Fixes liamg#7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filtered Ports not populated

1 participant