Skip to content

Add first-seen and last-seen DNS history metadata#23

Open
LAieh12 wants to merge 5 commits into
codingo:mainfrom
LAieh12:codex/dooked-first-last-seen
Open

Add first-seen and last-seen DNS history metadata#23
LAieh12 wants to merge 5 commits into
codingo:mainfrom
LAieh12:codex/dooked-first-last-seen

Conversation

@LAieh12

@LAieh12 LAieh12 commented Jun 25, 2026

Copy link
Copy Markdown

Fixes #1.

Implements first-seen / last-seen tracking for DNS records in JSON history output, including preservation of historical records that disappear from later scans.

Changes:

  • Adds per-record first-seen, last-seen, seen, and currently-seen metadata to dns_probe entries.
  • Preserves historical DNS records that are missing from the current run so old rotating/load-balanced answers are not lost.
  • Marks preserved historical records as currently-seen: false while current records are written as currently-seen: true.
  • Keeps default compare noise low by comparing against only records that were active in the previous run, while still allowing historical missing-record reporting through the new last-seen flags.
  • Updates existing records by preserving their first seen timestamp, refreshing last seen, and incrementing seen count.
  • Adds --fs / --first-seen to print records first observed in the current run.
  • Adds --ls / --last-seen N to print missing records last seen at least N days ago.
  • Adds --lsd / --last-seen-date to print missing records last seen before a US date/datetime.
  • Reads old JSON files that do not yet contain the new metadata, including dashed and snake_case legacy keys.
  • Documents the DNS history metadata and flags in the README.
  • Adds an isolated CMake/CTest regression test for DNS history metadata that does not require network, Boost, or OpenSSL.

Verification:

  • git diff --check passes.
  • Configured the isolated history test with CMake using -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DDOOKED_BUILD_HISTORY_TESTS=ON.
  • Built dooked_dns_history_test with MSVC.
  • ctest --output-on-failure passes for the DNS history regression test.
  • Full app build still requires configured Boost/OpenSSL development dependencies in my local environment; the history regression target is isolated so reviewers can verify the new metadata behavior without DNS/network/SSL setup.

Paypal: https://www.paypal.me/VeraLeonardo16

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.

Adding first-seen/last-seen to dataset with new flags

2 participants