Repository navigation
Hashcat status updated and aligned including migration on server side - #2622
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The status renumbering leaves the legacy mapping out of sync, causing incorrect labels and runtime errors for unmapped states; the mapping and its tests need updating.
1 open issue
What changed in this PR
Implements the backend portion of #2517 by aligning chunk states with hashcat’s status enum and migrating existing data. Deployment requires coordinated frontend and agent updates.
Changes:
- Aligns status constants, model choices, and API schemas, including newer hashcat states.
- Adds MySQL and PostgreSQL migrations and updates abort handling and progress images.
- Updates test-agent states and expands protocol and enum tests.
| File | Description |
|---|---|
src/migrations/postgres/20261110130000_chunk-state-hashcat-enum.sql |
Migrates stored PostgreSQL chunk states. |
src/migrations/mysql/20261110130000_chunk-state-hashcat-enum.sql |
Migrates stored MySQL chunk states. |
src/inc/defines/DHashcatStatus.php |
Aligns constants and defines aborted states. |
src/inc/apiv2/helper/GetTaskProgressImageHelperAPI.php |
Uses explicit aborted states for image coloring. |
src/inc/agentapi/schema/SchemaRegistry.php |
Documents aligned agent status values. |
src/inc/agentapi/model/SendProgressAction.php |
Handles additional abort states and renamed runtime status. |
src/inc/agentapi/model/GetChunkAction.php |
Allows redispatch for additional stopped states. |
src/dba/models/generator.php |
Updates generated status choices. |
src/dba/models/Chunk.php |
Aligns chunk model status metadata. |
src/api/taskimg.php |
Updates legacy progress-image coloring. |
openapi.json |
Publishes aligned status values and labels. |
ci/phpunit/inc/utils/AccessGroupUtilsTest.php |
Extends group-abort cases to new states. |
ci/phpunit/inc/defines/DHashcatStatusTest.php |
Tests enum values and aborted-state membership. |
ci/apiv2/test_realworld_dump.py |
Expects migrated states from legacy data. |
ci/apiv2/test_agent_protocol.py |
Updates status values and tests new states. |
ci/apiv2/hashtopolis_agent.py |
Aligns the test agent’s status enum. |
Review effort: Balanced
Comment on lines
+12
to
+15
| const RUNNING = 3; | ||
| const PAUSED = 4; | ||
| const EXHAUSTED = 5; | ||
| const CRACKED = 6; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

backend part of #2517
Note: needs to be synchronously merged with frontend and other agents