From 4379922517ba058c5cd8166634e545d255815707 Mon Sep 17 00:00:00 2001 From: msk- Date: Thu, 29 Apr 2021 11:24:49 +0100 Subject: [PATCH] Add docker usage --- .dockerignore | 2 ++ Dockerfile | 9 +++++++++ README.md | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3978a0f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git +.gitignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..42d7741 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python + +WORKDIR /pcap2curl + +COPY . . + +RUN pip install . +RUN chmod +x pcap2curl.py +RUN echo "export PATH=/pcap2curl:\"$PATH\"" >> ~/.bashrc diff --git a/README.md b/README.md index 7c02b16..bb81c58 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,11 @@ Little effort is made to verify that the requests are valid. This is intended to DISCLAIMER: I am not a Python coder. I do not like Python. I have to use it once in a while because I love [Scapy](http://www.secdev.org/projects/scapy/). +## Usage with docker +```sh +docker build . -t pcap2curl +docker run -v /host/path/to/capture.pcap:/capture.pcap pcap2curl bash +pcap2curl.py /capture.pcap +``` + CREDIT: Stackoverflow