Allow uploading and storing cracker binaries on the server - #2469
Draft
s3inlc wants to merge 11 commits into
Draft
Allow uploading and storing cracker binaries on the server#2469s3inlc wants to merge 11 commits into
s3inlc wants to merge 11 commits into
Conversation
…token or via agent token
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.
Cracker binaries can now be stored on the server itself instead of only referencing an external download URL. Existing URL-based binaries are fully unaffected.
Upload (apiv2)
POST /api/v2/ui/crackersaccepts an alternative todownloadUrl:sourceType/sourceDatawith three sources:import: consume an archive uploaded through the existing chunked (TUS) upload to the import directory — the path for arbitrarily large archives, no PHP request-size limits involvedurl: the server fetches the archive itself (http/https only)inline: base64 archive data for small uploads.7zarchives are accepted (7z magic-byte validation); the archive filename is server-composed ({crackerType}-{version}.7z), and thedownloadUrlis set automatically to the server's download endpoint — no client-supplied filenames or URLsfilenamecolumn onCrackerBinarydoubles as the local-storage flag (NULL = external URL binary, as before)Download
GET /api/download.php/{kind}/{id}(kind registry, extensible to files/hashlists later) — authenticated with either an agent token (?token=) or an apiv2 Bearer JWT; streams with HTTP Range and ETag supportdownloadBinaryaction appends the requesting agent's token to the URL of locally hosted binaries, so the existing fetch-and-extract flow just worksdownloadUrlof local binaries is server-owned and cannot be patched