Skip to content

banner: add ZMap-compatible probe templates [COPILOT] - #768

Draft
Seanstoppable wants to merge 3 commits into
zmap:masterfrom
Seanstoppable:ssmith/banner-probe-templates
Draft

Seanstoppable wants to merge 3 commits into
zmap:masterfrom
Seanstoppable:ssmith/banner-probe-templates

Conversation

@Seanstoppable

@Seanstoppable Seanstoppable commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

I have a set of scans where I encode some data in the probe, similar to how zmap's UDP templating works
I currently have a custom module for this, but am aiming to retire it by contributing back a bigger set of changes to zgrab2 proper

Changes

  • Add --expand-probe without changing existing static-probe behavior.
  • Support the full ZMap UDP template macro set, including socket addresses and ports, random values, hexadecimal bytes, Unix timestamps, and NTP timestamps.
  • Preserve unknown template fields literally, matching ZMap behavior.
  • Expand connection-dependent fields from the established socket and explicitly reject IPv4 network-order address fields on IPv6 connections.
  • Document template syntax, byte encodings, and examples.
  • Add parser, expansion, validation, IPv4/IPv6, file-probe, inline-probe, and scanner integration tests.

Testing

  • go test ./modules/banner
  • go test -race ./modules/banner
  • golangci-lint run ./modules/banner/...
  • go test ./...
  • Built cmd/zgrab2 and inspected zgrab2 banner --help

Session

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Seanstoppable and others added 3 commits September 9, 2026 13:02
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant