diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 502a688..d8a5739 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -23,4 +23,4 @@ jobs: uv pip install --python .venv/bin/python ".[dev]" - name: Run mypy - run: .venv/bin/mypy hate_crack + run: .venv/bin/mypy --exclude HashcatRosetta --exclude hashcat-utils --ignore-missing-imports hate_crack diff --git a/hate_crack/api.py b/hate_crack/api.py index f3955eb..d0ee8de 100644 --- a/hate_crack/api.py +++ b/hate_crack/api.py @@ -812,8 +812,9 @@ class HashviewAPI: resp.raise_for_status() if output_file is None: output_file = f"left_{customer_id}_{hashfile_id}.txt" - output_file = os.fspath(output_file) - output_abs = os.path.abspath(output_file) + # Convert to absolute path to ensure file is preserved if CWD changes + output_file = os.path.abspath(output_file) + output_abs = output_file total = int(resp.headers.get("content-length", 0)) downloaded = 0 chunk_size = 8192 @@ -1013,6 +1014,9 @@ class HashviewAPI: resp.raise_for_status() if output_file is None: output_file = f"found_{customer_id}_{hashfile_id}.txt" + + # Convert to absolute path to ensure file is preserved if CWD changes + output_file = os.path.abspath(output_file) total = int(resp.headers.get("content-length", 0)) downloaded = 0 diff --git a/pyproject.toml b/pyproject.toml index 85d183f..fe707bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,10 +54,12 @@ exclude = [ "^dist/", "^PACK/", "^wordlists/", + "^HashcatRosetta/", + "^hashcat-utils/", "^hate_crack/hashcat-utils/", "^hate_crack/princeprocessor/", ] -ignore_missing_imports = false +ignore_missing_imports = true [tool.pytest.ini_options] testpaths = [