How can I write a GNU File magic test to loop?

1

0

Either here or on StackOverflow: I may be trying to get more power than the language allows, but I was writing some new file formats test suites using the man page for libmagic when I wanted to reduce some work. I may have to simply develop a test that matches one element correctly, and then copy-paste it 11 more times to represent reading the detail for each group in the file.

  • I can control the value using exact or relational comparisons, including an additional special always true x test;
  • there are exact/absolute, relative, and indirect offsets;
  • and there are empty, static, or dynamic message printing;
  • for statement control I am only aware of the common hierarchy control for matching and the special default test that may act inverse to the current test history state;
  • there are other type matching/output (mime) and strength/confidence value control;

My interest is if there is any more statement control, but I doubt there is since the man page isn't that long. Maybe a small chance of something being in the code and not in that doc or in another one that I haven't found yet. The tool is old I'm guessing and has several major versions so it's bound to have some wealth of functionality.

I sent an email to the astron mailing list I found from the github mirror repo without any response and felt like posting here too.

Pysis

Posted 2019-05-17T01:33:50.927

Reputation: 980

No answers