Skip to content

Fix missing filename #9

Fix missing filename

Fix missing filename #9

Workflow file for this run

name: Test Zeek artifact against many pcaps
on:
push:
branches:
- pcap-test
workflow_dispatch:
jobs:
test:
strategy:
matrix:
platform: [windows-2019]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout build-zeek
uses: actions/checkout@v3
- name: Install wget on Windows
if: startsWith(matrix.platform, 'windows-')
run: choco install -y --no-progress wget
shell: cmd
- name: Run tests
run: |
set -xv
wget --quiet https://github.com/brimdata/build-zeek/releases/download/v6.2.0-brim-dev1/zeek-v6.2.0-brim-dev1.windows-amd64.zip
unzip -q zeek-v6.2.0-brim-dev1.windows-amd64.zip
mv zeek/share/zeek/site/local.zeek zeek/share/zeek/site/local.zeek.orig
sed "/detect-MHR/d;/interesting-hostnames/d" zeek/share/zeek/site/local.zeek.orig > zeek/share/zeek/site/local.zeek
for filename in $(wget -O - https://archive.wrccdc.org/pcaps/2018/ | grep \.pcap\.gz | sed 's/.*href="//' | sed 's/".*$//'); do
echo "Testing with $filename"
wget --quiet https://archive.wrccdc.org/pcaps/2018/$filename
gzip -d $filename
cat ${filename/.gz/} | zeek/zeekrunner -
echo $?
ls -l *.log
rm *.log ${filename/.gz/}
done
shell: sh