File: diff-state-db

package info (click to toggle)
zeekctl 2.2.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,544 kB
  • sloc: python: 5,639; sh: 1,374; makefile: 71; awk: 24
file content (11 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#! /usr/bin/env bash
#
# Given a dump of the state database that has been converted to "key = value"
# format, this script replaces values that change between test runs with
# the string XXXXX.

# Replace zeek version, zeek PID, and zeekctl cfg hash (zeekctl cfg has absolute
# paths that change for each test run, so the config hash changes for each
# test run).
sed -e 's/^zeekversion = "[0-9.a-z-]*"/zeekversion = "XXXXX"/' -e 's/^configchksum = "[0-9a-f]*"/configchksum = "XXXXX"/' -e 's/^hash-zeekctlcfg = "[0-9a-f]*"/hash-zeekctlcfg = "XXXXX"/' -e 's/^\([a-z0-9-]*-pid\) = [0-9][0-9]*/\1 = XXXXX/' -e 's/^global-hash-seed = "[0-9a-f]*"/global-hash-seed = "XXXXXXXX"/'