ensure status line shows dates for new and existing imports

This commit is contained in:
Jason Ertel
2023-06-13 15:11:13 -04:00
parent bbdf7bb5a7
commit 90b740a997

View File

@@ -194,10 +194,6 @@ for PCAP in $INPUT_FILES; do
status "- analyzing traffic with Zeek" status "- analyzing traffic with Zeek"
zeek "${PCAP}" $HASH zeek "${PCAP}" $HASH
{% endif %} {% endif %}
START=$(pcapinfo "${PCAP}" -a |grep "First packet time:" | awk '{print $4}')
END=$(pcapinfo "${PCAP}" -e |grep "Last packet time:" | awk '{print $4}')
status "- saving PCAP data spanning dates $START through $END"
fi fi
if [[ "$HASH_FILTERS" == "" ]]; then if [[ "$HASH_FILTERS" == "" ]]; then
@@ -208,6 +204,10 @@ for PCAP in $INPUT_FILES; do
HASHES="${HASHES} ${HASH}" HASHES="${HASHES} ${HASH}"
fi fi
START=$(pcapinfo "${PCAP}" -a |grep "First packet time:" | awk '{print $4}')
END=$(pcapinfo "${PCAP}" -e |grep "Last packet time:" | awk '{print $4}')
status "- found PCAP data spanning dates $START through $END"
# compare $START to $START_OLDEST # compare $START to $START_OLDEST
START_COMPARE=$(date -d $START +%s) START_COMPARE=$(date -d $START +%s)
START_OLDEST_COMPARE=$(date -d $START_OLDEST +%s) START_OLDEST_COMPARE=$(date -d $START_OLDEST +%s)