From 5ed0fdb607ce8505d5b0d5386e3ae90b82ef68f3 Mon Sep 17 00:00:00 2001 From: Jannic Date: Thu, 9 May 2024 01:33:54 +0200 Subject: [PATCH] pls work.... --- Dockerfile | 25 ++++++++++++++++++------- help_crack.py | 1 + 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9af16d6..c8a290f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ # Start with the NVIDIA CUDA base image -FROM nvidia/cuda:11.8.0-base-ubuntu22.04 +FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 -# Install essential tools and update packages +LABEL com.nvidia.volumes.needed="nvidia_driver" + +# Update and install essential packages RUN apt-get update && apt-get install -y \ + ca-certificates \ build-essential \ python3 \ python3-pip \ @@ -12,21 +15,29 @@ RUN apt-get update && apt-get install -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Install Hashcat from repository -RUN apt-get update && apt-get install -y hashcat +# Set up the NVIDIA environment +ENV PATH /usr/local/nvidia/bin:${PATH} +ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH} + +# Clone and build Hashcat +RUN mkdir -p /hashcat && \ + cd /hashcat && \ + git clone https://github.com/hashcat/hashcat.git . && \ + git submodule update --init && \ + make install && \ + rm -rf .git # Set up the Python environment RUN pip3 install --upgrade pip # Copy your Python script to the container -# (Replace help_crack.py with your actual script) COPY help_crack.py /app/help_crack.py # Create a subfolder for script output RUN mkdir -p /app/data -# Set the working directory to the subfolder +# Set the working directory to the script output folder WORKDIR /app/data -# Run the script with relative paths +# Run the Python script CMD ["python3", "../help_crack.py", "-co=--deprecated-check-disable", "--pot", "cracked.potfile"] diff --git a/help_crack.py b/help_crack.py index ea245f8..d1cf7f9 100755 --- a/help_crack.py +++ b/help_crack.py @@ -831,6 +831,7 @@ def run(self): or keypair[0]['key'] != bytearray(netdata[0]['key'], 'utf-8', errors='ignore') \ or keypair[1]['key'] != bytearray(netdata[0]['key'], 'utf-8', errors='ignore'): self.pprint('Challenge solving failed! Check if your cracker runs correctly.', 'FAIL') + exit(1) hashcache = set() netdata = self.resume_check()