Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roy inspect custom signatures #108

ross-spencer opened this issue Nov 1, 2017 · 3 comments

roy inspect custom signatures #108

ross-spencer opened this issue Nov 1, 2017 · 3 comments


Copy link

Hi Richard,

I tried to inspect this following custom signature I added using Roy (the signature is for identifying HFS disk images):

	<?xml version="1.0" encoding="UTF-8"?>
	<FFSignatureFile xmlns="" Version="1" DateCreated="2017-10-25T11:10:16+01:00">
	  <InternalSignature ID="1" Specificity="Specific">
	  <ByteSequence Reference="BOFoffset">
		<SubSequence MinFragLength="23" Position="1" SubSeqMaxOffset="1024" SubSeqMinOffset="1024">
		  <Shift Byte="00">1</Shift>
		  <LeftFragment MaxOffset="0" MinOffset="0" Position="1">02</LeftFragment>
		  <LeftFragment MaxOffset="0" MinOffset="0" Position="1">08</LeftFragment>
		  <LeftFragment MaxOffset="0" MinOffset="0" Position="2">0000</LeftFragment>
		  <LeftFragment MaxOffset="4" MinOffset="4" Position="3">0003</LeftFragment>
		  <LeftFragment MaxOffset="1" MinOffset="1" Position="4">0000</LeftFragment>
		  <LeftFragment MaxOffset="0" MinOffset="0" Position="5">01</LeftFragment>
		  <LeftFragment MaxOffset="0" MinOffset="0" Position="5">08</LeftFragment>
		  <LeftFragment MaxOffset="8" MinOffset="8" Position="6">4244</LeftFragment>
		  <RightFragment MaxOffset="1" MinOffset="1" Position="1">0000</RightFragment>
		  <RightFragment MaxOffset="1" MinOffset="1" Position="2">0000</RightFragment>
	  <FileFormat ID="1" Name="HFS-Dev-Sig-3" PUID="hfs/1" Version="1.0" MIMEType="application/hfs">

Should that be possible at all? - Currently in Linux I just get a blank line output. (The signature works well in Siegfried).

Copy link

richardlehane commented Nov 1, 2017

Hi Ross,
tldr try a command like: roy inspect -extend hfs-dev-sig-3.xml hfs/1

Long version: when you use roy inspect to inspect formats it uses as input the source XML files (normally the droid XML file and/or the harvested PRONOM XML files) rather than your compiled signature (.sig) file. (This is because once signatures are compiled they are kind of shredded up for inserting in the search trees & pretty difficult to reconstruct). So to inspect a custom signature you need to use the same -extend or -extendc flags (if a container signature) you would use to build the signature file in order to tell roy where it can find your custom source file.

E.g. like:


Copy link

p.s. I'll make a change for the next release so that if roy can't find anything to inspect, rather than a blank line, it will return a more meaningful message like "I can't inspect {user input}! See roy inspect -help"

Copy link
Collaborator Author

ross-spencer commented Nov 1, 2017 via email

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

No branches or pull requests

2 participants