[File] "script executable" misdetection
Christos Zoulas
christos at zoulas.com
Sat Dec 24 22:46:46 UTC 2022
Perhaps, but these days filenames can have UTF8 characters and scripts can have binary payloads... Yes this is not the case here and we
could require interpreters to be 7bit-printable... Let me think how to do it...
christos
> On Dec 21, 2022, at 2:08 PM, Christoph Biedl <astron.com.bwoj at manchmal.in-ulm.de> wrote:
>
> Signed PGP part
> Hello,
>
> during some tests I encountered the following:
>
> $ printf '#!\xdb\x0e' | file -
> /dev/stdin: a \333\016 script executable (binary data)
>
> This was introduced in
>
> commit e2b34d5c7232ae3a0fdc898e9893e36c647efbbb (HEAD, refs/bisect/bad)
> Author: Christos Zoulas <christos at zoulas.com>
> Date: Sun Oct 9 17:47:36 2022 +0000
>
> Use string/w to merge many patterns; make their strength ~30 equal for env
> and non env scripts but less to the more specific commands. Move a specific
> command to commands from scripts.
>
> Basically everything that starts with "#!" is now considered some
> script. Perhaps limit this to cases where the following characters are
> 7bit printable?
>
> Christoph
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20221224/7921bfcb/attachment.asc>
More information about the File
mailing list