Skip to content

Commit

Permalink
Adding dockerfile and pip requirements files
Browse files Browse the repository at this point in the history
  • Loading branch information
ethack committed Nov 8, 2018
1 parent 618f912 commit 7c8e878
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM python:2.7-slim

# Prevent packages like wireshark from prompting
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
arp-scan \
ettercap-text-only \
nmap \
wireshark \
&& rm -rf /var/lib/apt/lists/

ADD requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r /requirements.txt
RUN echo 'noenum = [ Resolve(), TCP_SERVICES, UDP_SERVICES ]' >> $HOME/.scapy_startup.py

ADD passer.py /passer.py

ENTRYPOINT ["python", "/passer.py"]

# https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL org.opencontainers.image.title="passer"
LABEL org.opencontainers.image.description="PASsive SERvice sniffer"
LABEL org.opencontainers.image.url="https://github.com/activecm/passer"
LABEL org.opencontainers.image.documentation="https://github.com/activecm/passer/blob/master/passer.txt"

# docker build -t passer .
# docker run --rm -it --name=passer --net=host passer
10 changes: 10 additions & 0 deletions passer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ pypcap (a modified version for scapy), libdnet, and pyreadline.
it as "C:\WINDOWS\passer".


======== Docker ========

You may also use passer within docker. You can build the passer image like this:
docker build -t passer .

And then you can run it like this:
docker run --rm -it --name=passer --net=host passer

In order to kill passer you can run:
docker stop passer


======== Examples ========
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ipaddress
pytz
scapy>=2.4.0

0 comments on commit 7c8e878

Please sign in to comment.