Skip to content

test : add unit tests for hashcat plugin parser #1560

Description

@tmdeveloper007

Summary of What Needs to be Done:
Add a dedicated unit test file for the hashcat plugin parser in plugins/hashcat/parser.py. The parser currently has no test coverage.

The hashcat parser processes hashcat output and extracts cracked passwords, hash information, and session statistics.

Changes that Need to be Made:
Create testing/backend/unit/test_hashcat_plugin.py with:

  • Tests for parse() with various hashcat output formats:
    • Successful crack with hash and password
    • Multiple cracked hashes in output
    • Session statistics in output
    • Empty output
    • Malformed/non-hashcat output
    • Return value structure validation (findings, count, rows)
  • Add a fixtures directory: testing/backend/unit/fixtures/hashcat/ with sample hashcat outputs

Impact that it would Provide:

  • Covers a currently untested plugin parser
  • Enables regression detection for hash parsing logic changes
  • Follows the existing plugin unit test pattern

Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions