Skip to content

Commit

Permalink
Docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
packmad committed Jan 14, 2021
1 parent c29b936 commit 173e85e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM debian:bullseye-slim

RUN apt update -qq && apt upgrade -y && apt install -y wget tar libglib2.0-0 && \
wget https://github.com/horsicq/DIE-engine/releases/download/3.01/die_lin64_portable_3.01.tar.gz && \
tar -xzf die_lin64_portable_3.01.tar.gz

# db update
RUN rm -rf /die_lin64_portable/base/db
COPY ./db /die_lin64_portable/base/db

ENTRYPOINT ["/die_lin64_portable/diec.sh"]
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,30 @@ Changelog: https://github.com/horsicq/Detect-It-Easy/blob/master/changelog.txt

![alt text](https://github.com/horsicq/Detect-It-Easy/blob/master/mascots/die.jpg "Mascot")


Run with Docker
=======

You can also run DIE with [Docker](https://www.docker.com/community-edition)! Of course, this requires that you have git and Docker installed.

Here's how to use DIE with Docker:

```bash
git clone https://github.com/horsicq/Detect-It-Easy
cd Detect-It-Easy/
docker build . -t horsicq:diec
docker/diec.sh ~/example/infected.exe

filetype: PE32
arch: I386
mode: 32
endianess: LE
type: GUI
protector: Themida/Winlicense(2.X)[-]
linker: Turbo Linker(2.25*,Delphi)[GUI32]
```


How to build on Linux
=======

Expand Down
21 changes: 21 additions & 0 deletions docker/diec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# This will simply take the argument passed to it,
# parse the directory and bind it as a read-only mount point on the container
# and pass in the filename as the argument to diec.sh
# This assumes file target is last argument!

# Build with:
# docker build . -t horsicq:diec

TARGET="${@: -1}" # last argument is target file
INPUT_DIR=$(cd $(dirname "$TARGET") && pwd -P)
INPUT_FILE=$(basename $TARGET)


if [ "$#" -eq 0 ]; then
docker run -i horsicq:diec
elif [ "$#" -eq 1 ]; then
docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE";
else
docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE" "${@:1:$#-1}";
fi

0 comments on commit 173e85e

Please sign in to comment.