As part of a program I am in, I have been given a zip file that won't open. I have worked out that the file header is missing from the zip, but I am not sure how to put it back. Simply replacing the first bytes or using programs that ignore the header to unzip doesn't work, so I think I need to put them before the rest of the file. This might require offsetting the file or something, but I don't know a lot about hex editing/hex editors, or how to do what I need to.
I'm using Manjaro (a vm provided by the program), and gHex to view and edit the files (though I can install different ones/work from the terminal if that will solve my problem).
Edit: Running zip -F or zip -FF returns:
Fix archive (-F) - assume mostly intact archive Zip entry offsets appear off by -4 bytes - correcting... copying: masterkey zip warning: reading archive fseek: Invalid argument zip warning: bad - skipping: masterkey zip warning: zip file empty
The problem with the above is that I am almost certain that the zip file cannot be empty -- it should contain something that has a flag (attempting to extract the 'fixed' zip also returns 'Error extracting archive' from the archive manager).