Mark0's Forum
Software => TrID File Identifier => Topic started by: zacharyw on September 20, 2021, 07:10:44 PM
-
Hi Marco,
Is it possible to stream a file's contents to TrID for identification, rather than passing a file name?
For example, I can do something like this to pipe the trid binary to file:
user@ubuntu:~$ cat trid | file -
/dev/stdin: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.24, stripped
I tried using process substitution, as well as reading directly from stdin, but TrID does not accept these approaches:
user@ubuntu:~$ ./trid <(cat trid)
user@ubuntu:~$ cat trid | ./trid /dev/stdin
TrID/32 - File Identifier v2.24 - (C) 2003-16 By M.Pontello
* Error: found no file(s) to analyze!
Is this functionality supported? Thanks for the excellent tool. :)
-
Thx!
Not at the moment, but probably in a future version (can't say when).
-
Thanks for the quick response. I work for a non-commercial organization, and this functionality would be very useful for us. If this could be done in a relatively straightforward manner (not sure how the code is presently architected), we would be interested in extending the code and sharing it back to you.
If this is something you would consider, we can discuss further over email? If not, I understand, and appreciate you taking the time to answer my questions.
-
Thanks, but for the time being, I'm not considering collaborations on TrID's development (aside from new filetypes definitions, of course).
-
Okay thanks again for getting back to me. If you change your mind, the offer stands. We would not seek any ownership, and would be happy to sign an agreement saying that it is a free contribution to your project. Have a great day. :)