1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*a4d6d3b8SXin LI# $File: commands,v 1.69 2022/04/20 21:14:23 christos Exp $ 4b6cee71dSXin LI# commands: file(1) magic for various shells and interpreters 5b6cee71dSXin LI# 6b6cee71dSXin LI#0 string/w : shell archive or script for antique kernel text 743a5ec4eSXin LI0 string/fwt #!\ /bin/sh POSIX shell script text executable 8b6cee71dSXin LI!:mime text/x-shellscript 943a5ec4eSXin LI0 string/fwb #!\ /bin/sh POSIX shell script executable (binary data) 10b6cee71dSXin LI!:mime text/x-shellscript 11b6cee71dSXin LI 1243a5ec4eSXin LI0 string/fwt #!\ /bin/csh C shell script text executable 13b6cee71dSXin LI!:mime text/x-shellscript 14b6cee71dSXin LI 15b6cee71dSXin LI# korn shell magic, sent by George Wu, gwu@clyde.att.com 1643a5ec4eSXin LI0 string/fwt #!\ /bin/ksh Korn shell script text executable 17b6cee71dSXin LI!:mime text/x-shellscript 1843a5ec4eSXin LI0 string/fwb #!\ /bin/ksh Korn shell script executable (binary data) 19b6cee71dSXin LI!:mime text/x-shellscript 20b6cee71dSXin LI 2143a5ec4eSXin LI0 string/fwt #!\ /bin/tcsh Tenex C shell script text executable 22b6cee71dSXin LI!:mime text/x-shellscript 2343a5ec4eSXin LI0 string/fwt #!\ /usr/bin/tcsh Tenex C shell script text executable 24b6cee71dSXin LI!:mime text/x-shellscript 2543a5ec4eSXin LI0 string/fwt #!\ /usr/local/tcsh Tenex C shell script text executable 26b6cee71dSXin LI!:mime text/x-shellscript 2743a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/tcsh Tenex C shell script text executable 28b6cee71dSXin LI!:mime text/x-shellscript 29b6cee71dSXin LI 30b6cee71dSXin LI# 31b6cee71dSXin LI# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) 3243a5ec4eSXin LI0 string/fwt #!\ /bin/zsh Paul Falstad's zsh script text executable 33b6cee71dSXin LI!:mime text/x-shellscript 3443a5ec4eSXin LI0 string/fwt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable 35b6cee71dSXin LI!:mime text/x-shellscript 3643a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable 37b6cee71dSXin LI!:mime text/x-shellscript 38*a4d6d3b8SXin LI0 string/fwt #!\ /usr/bin/env\ zsh Paul Falstad's zsh script text executable 39d38c30c0SXin LI!:mime text/x-shellscript 40d38c30c0SXin LI 4143a5ec4eSXin LI0 string/fwt #!\ /bin/ash Neil Brown's ash script text executable 42b6cee71dSXin LI!:mime text/x-shellscript 4343a5ec4eSXin LI0 string/fwt #!\ /usr/bin/ash Neil Brown's ash script text executable 44b6cee71dSXin LI!:mime text/x-shellscript 4543a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/ash Neil Brown's ash script text executable 4643a5ec4eSXin LI!:mime text/x-shellscript 4743a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/ae Neil Brown's ae script text executable 4843a5ec4eSXin LI!:mime text/x-shellscript 4943a5ec4eSXin LI0 string/fwt #!\ /bin/nawk new awk script text executable 50b6cee71dSXin LI!:mime text/x-nawk 5143a5ec4eSXin LI0 string/fwt #!\ /usr/bin/nawk new awk script text executable 52b6cee71dSXin LI!:mime text/x-nawk 5343a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/nawk new awk script text executable 54b6cee71dSXin LI!:mime text/x-nawk 5543a5ec4eSXin LI0 string/fwt #!\ /bin/gawk GNU awk script text executable 56b6cee71dSXin LI!:mime text/x-gawk 57b6cee71dSXin LI0 string/wt #!\ /usr/bin/gawk GNU awk script text executable 58b6cee71dSXin LI!:mime text/x-gawk 5943a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/gawk GNU awk script text executable 60b6cee71dSXin LI!:mime text/x-gawk 61b6cee71dSXin LI# 6243a5ec4eSXin LI0 string/fwt #!\ /bin/awk awk script text executable 63b6cee71dSXin LI!:mime text/x-awk 6443a5ec4eSXin LI0 string/fwt #!\ /usr/bin/awk awk script text executable 65b6cee71dSXin LI!:mime text/x-awk 6640427ccaSGordon Tetlow0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text 67b6cee71dSXin LI 68b6cee71dSXin LI# AT&T Bell Labs' Plan 9 shell 6943a5ec4eSXin LI0 string/fwt #!\ /bin/rc Plan 9 rc shell script text executable 70b6cee71dSXin LI 71b6cee71dSXin LI# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) 7243a5ec4eSXin LI0 string/fwt #!\ /bin/bash Bourne-Again shell script text executable 73b6cee71dSXin LI!:mime text/x-shellscript 7443a5ec4eSXin LI0 string/fwb #!\ /bin/bash Bourne-Again shell script executable (binary data) 75b6cee71dSXin LI!:mime text/x-shellscript 7643a5ec4eSXin LI0 string/fwt #!\ /usr/bin/bash Bourne-Again shell script text executable 77b6cee71dSXin LI!:mime text/x-shellscript 7843a5ec4eSXin LI0 string/fwb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data) 79b6cee71dSXin LI!:mime text/x-shellscript 8043a5ec4eSXin LI0 string/fwt #!\ /usr/local/bash Bourne-Again shell script text executable 81b6cee71dSXin LI!:mime text/x-shellscript 8243a5ec4eSXin LI0 string/fwb #!\ /usr/local/bash Bourne-Again shell script executable (binary data) 83b6cee71dSXin LI!:mime text/x-shellscript 8443a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/bash Bourne-Again shell script text executable 85b6cee71dSXin LI!:mime text/x-shellscript 8643a5ec4eSXin LI0 string/fwb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data) 87b6cee71dSXin LI!:mime text/x-shellscript 8843a5ec4eSXin LI0 string/fwt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable 895f0216bdSXin LI!:mime text/x-shellscript 90b6cee71dSXin LI 912726a701SXin LI# Fish shell magic 922726a701SXin LI# From: Benjamin Lowry <ben@ben.gmbh> 9343a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/fish fish shell script text executable 942726a701SXin LI!:mime text/x-shellscript 9543a5ec4eSXin LI0 string/fwt #!\ /usr/bin/fish fish shell script text executable 962726a701SXin LI!:mime text/x-shellscript 9743a5ec4eSXin LI0 string/fwt #!\ /usr/bin/env\ fish fish shell script text executable 982726a701SXin LI!:mime text/x-shellscript 992726a701SXin LI 10043a5ec4eSXin LI0 string/wt #!\ a 101*a4d6d3b8SXin LI>&-1 string/T x %s script text executable 1022726a701SXin LI 10343a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/tclsh Tcl/Tk script text executable 1042726a701SXin LI!:mime text/x-tcl 1052726a701SXin LI 10643a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/texlua LuaTex script text executable 1072726a701SXin LI!:mime text/x-luatex 1082726a701SXin LI 10943a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/luatex LuaTex script text executable 1102726a701SXin LI!:mime text/x-luatex 1112726a701SXin LI 11243a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/stap Systemtap script text executable 1132726a701SXin LI!:mime text/x-systemtap 1142726a701SXin LI 11543a5ec4eSXin LI# From: Kylie McClain <kylie@somas.is> 11643a5ec4eSXin LI# Type: execline scripts 11743a5ec4eSXin LI# URL: https://skarnet.org/software/execline/ 11843a5ec4eSXin LI0 string/fwt #!\ /command/execlineb execline script text executable 11943a5ec4eSXin LI!:mime text/x-execline 12043a5ec4eSXin LI0 string/fwt #!\ /bin/execlineb execline script text executable 12143a5ec4eSXin LI!:mime text/x-execline 12243a5ec4eSXin LI0 string/fwt #!\ /usr/bin/execlineb execline script text executable 12343a5ec4eSXin LI!:mime text/x-execline 12443a5ec4eSXin LI0 string/fwt #!\ /usr/bin/env\ execlineb execline script text executable 12543a5ec4eSXin LI!:mime text/x-execline 1262726a701SXin LI 12743a5ec4eSXin LI0 string #! 12843a5ec4eSXin LI>0 regex \^#!.*/bin/execlineb([[:space:]].*)*$ execline script text executable 12943a5ec4eSXin LI!:mime text/x-execline 1302726a701SXin LI 131b6cee71dSXin LI# PHP scripts 132b6cee71dSXin LI# Ulf Harnhammar <ulfh@update.uu.se> 133b6cee71dSXin LI0 search/1/c =<?php PHP script text 13440427ccaSGordon Tetlow!:strength + 30 135b6cee71dSXin LI!:mime text/x-php 136b6cee71dSXin LI0 search/1 =<?\n PHP script text 137b6cee71dSXin LI!:mime text/x-php 138b6cee71dSXin LI0 search/1 =<?\r PHP script text 139b6cee71dSXin LI!:mime text/x-php 140b6cee71dSXin LI0 search/1/w #!\ /usr/local/bin/php PHP script text executable 141b6cee71dSXin LI!:strength + 10 142b6cee71dSXin LI!:mime text/x-php 143b6cee71dSXin LI0 search/1/w #!\ /usr/bin/php PHP script text executable 144b6cee71dSXin LI!:strength + 10 145b6cee71dSXin LI!:mime text/x-php 14648c779cdSXin LI# Smarty compiled template, https://www.smarty.net/ 147b6cee71dSXin LI# Elan Ruusamae <glen@delfi.ee> 1483e41d09dSXin LI0 string =<?php 1493e41d09dSXin LI>5 regex [\ \n] 1503e41d09dSXin LI>>6 string /*\ Smarty\ version Smarty compiled template 15120f8619dSXin LI>>>24 regex [0-9.]+ \b, version %s 152b6cee71dSXin LI!:mime text/x-php 153b6cee71dSXin LI 154b6cee71dSXin LI0 string Zend\x00 PHP script Zend Optimizer data 155b6cee71dSXin LI 156*a4d6d3b8SXin LI# From: Anatol Belski <ab@php.net> 157*a4d6d3b8SXin LI0 string OPCACHE 158*a4d6d3b8SXin LI>7 ubyte 0 PHP opcache filecache data 159*a4d6d3b8SXin LI 160*a4d6d3b8SXin LI0 search/64 --TEST-- 161*a4d6d3b8SXin LI>16 search/64 --FILE-- 162*a4d6d3b8SXin LI>24 search/8192 --EXPECT PHP core test 163*a4d6d3b8SXin LI!:ext phpt 164*a4d6d3b8SXin LI 165*a4d6d3b8SXin LI# https://www.php.net/manual/en/phar.fileformat.signature.php 166*a4d6d3b8SXin LI-4 string GBMB PHP phar archive 167*a4d6d3b8SXin LI>-8 ubyte 0x1 with MD5 signature 168*a4d6d3b8SXin LI!:ext phar 169*a4d6d3b8SXin LI>-8 ubyte 0x2 with SHA1 signature 170*a4d6d3b8SXin LI!:ext phar 171*a4d6d3b8SXin LI>-8 ubyte 0x3 with SHA256 signature 172*a4d6d3b8SXin LI!:ext phar 173*a4d6d3b8SXin LI>-8 ubyte 0x4 with SHA512 signature 174*a4d6d3b8SXin LI!:ext phar 175*a4d6d3b8SXin LI>-8 ubyte 0x10 with OpenSSL signature 176*a4d6d3b8SXin LI!:ext phar 177*a4d6d3b8SXin LI>-8 ubyte 0x11 with OpenSSL SHA256 signature 178*a4d6d3b8SXin LI!:ext phar 179*a4d6d3b8SXin LI>-8 ubyte 0x12 with OpenSSL SHA512 signature 180*a4d6d3b8SXin LI!:ext phar 181*a4d6d3b8SXin LI 182b6cee71dSXin LI0 string/t $! DCL command file 183b6cee71dSXin LI 184b6cee71dSXin LI# Type: Pdmenu 18548c779cdSXin LI# URL: https://packages.debian.org/pdmenu 186b6cee71dSXin LI# From: Edward Betts <edward@debian.org> 187b6cee71dSXin LI0 string #!/usr/bin/pdmenu Pdmenu configuration file text 188a5d223e6SXin LI 189a5d223e6SXin LI# From Danny Weldon 190a5d223e6SXin LI0 string \x0b\x13\x08\x00 191a5d223e6SXin LI>0x04 uleshort <4 ksh byte-code version %d 192