Skip to content

Commit 9c50814

Browse files
authored
Merge pull request #336 from cglewis/master
several fixes
2 parents 1b1e8c2 + 06067be commit 9c50814

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

mercury/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def ispcap(pathfile):
5656
def main():
5757
pcap_paths = []
5858
path = sys.argv[1]
59+
if path == "":
60+
sys.exit(1)
5961
if os.path.isdir(path):
6062
for root, _, files in os.walk(path):
6163
for pathfile in files:

network_tap/ncapture/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -e
23

34
URI="$1"
45
INTERVAL="$2"

pcap_stats/pcap_stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@author: Charlie Lewis
66
"""
77

8-
import datetime
8+
from datetime import datetime
99
import json
1010
import os
1111
import shlex
@@ -89,7 +89,7 @@ def send_rabbit_msg(msg, channel, exchange='', routing_key='task_queue'):
8989
properties=pika.BasicProperties(
9090
delivery_mode=2,
9191
))
92-
print(" [X] %s UTC %r %r" % (str(datetime.datetime.utcnow()),
92+
print(" [X] %s UTC %r %r" % (str(datetime.utcnow()),
9393
str(msg['id']), str(msg['file_path'])))
9494
return
9595

snort/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM debian:buster-slim
22
LABEL maintainer="Charlie Lewis <[email protected]>"
33

44
ENV DAQ_VERSION 2.0.7
5-
ENV SNORT_VERSION 2.9.16
5+
ENV SNORT_VERSION 2.9.16.1
66

77
WORKDIR /opt
88

@@ -28,16 +28,18 @@ RUN apt-get update && \
2828
libnetfilter-queue1 \
2929
tcpdump \
3030
unzip && \
31-
wget https://www.snort.org/downloads/snort/daq-${DAQ_VERSION}.tar.gz \
31+
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
32+
RUN wget https://www.snort.org/downloads/snort/daq-${DAQ_VERSION}.tar.gz \
3233
&& tar xvfz daq-${DAQ_VERSION}.tar.gz \
3334
&& cd daq-${DAQ_VERSION} \
3435
&& autoreconf -f -i \
35-
&& ./configure; make; make install && \
36-
wget https://www.snort.org/downloads/snort/snort-${SNORT_VERSION}.tar.gz \
36+
&& ./configure; make; make install \
37+
&& rm -rf /opt/daq-${DAQ_VERSION}.tar.gz
38+
RUN wget https://www.snort.org/downloads/snort/snort-${SNORT_VERSION}.tar.gz \
3739
&& tar xvfz snort-${SNORT_VERSION}.tar.gz \
3840
&& cd snort-${SNORT_VERSION} \
39-
&& ./configure --disable-open-appid; make; make install && \
40-
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /opt/snort-${SNORT_VERSION}.tar.gz /opt/daq-${DAQ_VERSION}.tar.gz
41+
&& ./configure --disable-open-appid; make; make install \
42+
&& rm -rf /opt/snort-${SNORT_VERSION}.tar.gz
4143

4244
RUN ldconfig
4345
RUN touch /var/log/snort/alert

0 commit comments

Comments
 (0)