mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #10580 from Security-Onion-Solutions/dougburks-patch-1
Set START and END variables earlier in so-import-pcap
This commit is contained in:
@@ -194,6 +194,9 @@ 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"
|
status "- saving PCAP data spanning dates $START through $END"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -205,9 +208,6 @@ 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}')
|
|
||||||
|
|
||||||
# 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user