Skip to content

Commit

Permalink
Bump image version + printing versions
Browse files Browse the repository at this point in the history
  • Loading branch information
shaked8634 committed Apr 7, 2024
1 parent ef5e045 commit d58c8a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Checkout current repo
uses: actions/checkout@v4

- name: Set package version
run: sed -E -i "s/^__version__ = \"[a-z0-9\.]+\"/__version__ = \"$VERSION\"/g" ${REPOSITORY}/version.py

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
FROM nvidia/cuda:12.2.2-devel-ubuntu22.04

LABEL com.nvidia.volumes.needed="nvidia_driver"

Expand Down Expand Up @@ -59,4 +59,5 @@ ADD hashcat_wrapper.py .
COPY requirements.txt .
RUN pip3 install -r /root/requirements.txt && rm /root/requirements.txt

#CMD ["top"]
ENTRYPOINT ["python3", "/root/hashcat_wrapper.py"]
7 changes: 5 additions & 2 deletions hashcat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import time
import requests

__version__ = "0.0.0dev"

EXEC = "hashcat"
TMP_DIR = "/tmp"
NTFY_TOPIC = os.environ["NTFY_TOPIC"]
Expand All @@ -22,7 +24,7 @@
OUT_FILE = os.path.join(TMP_DIR, "hashcat.out")
UPDATE_INTERVAL = 10
STATUS = f"--quiet --status --status-json --status-timer={UPDATE_INTERVAL} --outfile {OUT_FILE}"
HASH_TARGET = None # Can be hash string or hashes file
HASH_TARGET = None # Can be hash string or hashes file

DISABLE_NTFY = True if os.environ.get("DISABLE_NTFY", "").lower() == "true" else False

Expand Down Expand Up @@ -183,5 +185,6 @@ def main() -> int:

if __name__ == "__main__":
ntfy_status = "ntfy is disabled" if DISABLE_NTFY else ""
logging.info(f"Starting Hashcat wrapper {ntfy_status}")
hashcat_version = subprocess.getoutput(f"{EXEC} --version")
logging.info(f"Starting Hashcat wrapper version: {__version__} (hashcat version: {hashcat_version}) {ntfy_status}")
send_ntfy(f"Finished on host {socket.gethostname()} (error code: {main()}")

0 comments on commit d58c8a3

Please sign in to comment.