[File] [PATCH] Add execline script detection

Christos Zoulas christos at zoulas.com
Sat Jul 3 13:50:42 UTC 2021


Committed, thanks!

christos

> On Jul 2, 2021, at 6:04 PM, Kylie McClain <kylie at somas.is> wrote:
> 
> diff --git a/magic/Magdir/commands b/magic/Magdir/commands
> index a402159e..04112ad5 100644
> --- a/magic/Magdir/commands
> +++ b/magic/Magdir/commands
> @@ -149,3 +149,19 @@
> # From Danny Weldon
> 0	string	\x0b\x13\x08\x00
>> 0x04   uleshort	<4      ksh byte-code version %d
> +
> +# From: Kylie McClain <kylie at somas.is <mailto:kylie at somas.is>>
> +# Type: execline scripts
> +# URL:  https://skarnet.org/software/execline/ <https://skarnet.org/software/execline/>
> +0	string/fwt	#!\ /command/execlineb		execline script text executable
> +!:mime	text/x-execline
> +0	string/fwt	#!\ /bin/execlineb		execline script text executable
> +!:mime	text/x-execline
> +0	string/fwt	#!\ /usr/bin/execlineb		execline script text executable
> +!:mime	text/x-execline
> +0	string/fwt	#!\ /usr/bin/env\ execlineb		execline script text executable
> +!:mime	text/x-execline
> +
> +0	string	#!
> +>0	regex	\^#!.*/bin/execlineb([[:space:]].*)*$	execline script text executable
> +!:mime	text/x-execline
> --

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20210703/f150570f/attachment-0001.htm>
-------------- 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/20210703/f150570f/attachment-0001.asc>


More information about the File mailing list