hermes-windows-ports.yaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: hermes-windows-ports
  2. repo: https://github.com/Yicheng-Mark/hermes-windows-plugins
  3. sha: 5bad3fb2baf04ce6befecfefce6d14f4c9c98934
  4. subdir: windows-ports
  5. description: >-
  6. Answer "who holds this port" on Windows. win_port_owners reads the TCP and UDP owner
  7. tables through iphlpapi (the same rows netstat -ano prints, with the owning PID attached)
  8. and resolves each PID to its image name and path, returning one structured record per
  9. endpoint. Filters cover one port, several ports, a process substring, the protocol (tcp,
  10. udp or both), the TCP state (listen, established, any state name, or all; UDP rows report
  11. bound) and IPv6 inclusion, with a record cap and a per-process summary of the rows
  12. returned. Built for the failure mode that stalls agents on Windows: a gateway, backend or
  13. bridge that cannot bind, where the error names a port but not the process holding it.
  14. netstat -ano prints columns, not fields, and its PID still needs a second command
  15. (tasklist, or a PowerShell round-trip) to become an image name; this tool is one
  16. in-process call instead of a shell parse plus a join, with no child process and no
  17. dependency on PowerShell being installed or allowed by execution policy. A protected
  18. process whose image cannot be queried keeps its PID and reports
  19. a null process name instead of failing the call. Disclosure - the tool reports the local
  20. and remote addresses, ports, PIDs and process image paths that netstat -ano and Task
  21. Manager already show, and those values reach the model; treat the output like any other
  22. local diagnostic listing. Read-only: no socket is opened, bound or connected, the only
  23. process access is QueryFullProcessImageName with PROCESS_QUERY_LIMITED_INFORMATION to read
  24. an image name, and there is no memory reading, no handle inheritance and no injection.
  25. Stdlib-only (ctypes): no Python dependencies, no child processes, no network calls, no file
  26. writes, no self-update. Windows only.
  27. maintainer: Yicheng-Mark
  28. tier: community
  29. category: tools
  30. requires_hermes: ">=0.21.4"
  31. docs_url: https://github.com/Yicheng-Mark/hermes-windows-plugins/tree/main/windows-ports
  32. version: "0.1.0"
  33. platforms:
  34. - windows
  35. capabilities:
  36. provides_tools:
  37. - win_port_owners
  38. provides_hooks: []
  39. provides_middleware: []
  40. requires_env: []