Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

add file signature for cpio #151

Merged
merged 2 commits into from
Mar 22, 2023
Merged

add file signature for cpio #151

merged 2 commits into from
Mar 22, 2023

Conversation

doug24
Copy link

@doug24 doug24 commented Dec 31, 2021

cpio file format used in RPM Package Manger
File signature from https://www.garykessler.net/library/file_sigs.html

@squid-box
Copy link
Owner

Sorry for being slow to respond, trying to get through the backlog a little bit at a time...

Looking at the documentation you're linking, it seems you've omitted the last byte
image

The last part, nn, has three different valid values - have you tested against a cpio file with your changes?

@doug24
Copy link
Author

doug24 commented Jan 19, 2022

No problem, thanks for reviewing it.

I have a fork of SevenZipSharp that I have been using for dnGrep, and this is the cpio signature I've been using in releases for two years. I originally used a longer signature (with 0x32). When I shortened it, by commit comment was "change signature for cpio files there are three variations in the sixth position, so match on just the first five".

I recently tested it with a Kibana rpm, which has a cpio archive in the rpm. I have not specifically tested this signature with all three formats (how to find them??), but I also haven't had any bug reports using this shorter one.

I'd like to drop my fork and change to use a maintained package, now that I see you have one. This is the only issue I found when changing to your NuGet package.

@squid-box squid-box merged commit 88f48c3 into squid-box:dev Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants