filtering file types vs. extensions
mikea at MIKEA.ATH.CX
Fri Jun 6 19:29:22 IST 2003
On Fri, Jun 06, 2003 at 07:16:07PM +0100, Julian Field wrote:
> Not a good start.
> The latest File::MMagic module does not understand Linux /usr/share/magic
> files. It complains a lot about them, which makes it useless.
> So I will have to use the "file" command, with a timeout and all that c**p
> to stop DoS attacks on the file command.
> Does everyone's "file" command output the filename followed by a ":"
> followed by 1 or more spaces followed by the file type?
> It's going to rain all weekend here (surprise, surprise) so I may attack
> this feature soon.
: (FreeBSD) $file *
: [some deletions]
: /etc/rc.virgin: Bourne shell script text executable
: /etc/remote: ASCII English text
: /etc/resolv.conf: ASCII text
: /etc/rmt: symbolic link to /usr/sbin/rmt
: /etc/rmt.virgin: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped
: /etc/security: Bourne shell script text executable
: /etc/skel: directory
: /etc/skeykeys: can't read `/etc/skeykeys' (Permission denied).
: /etc/skeykeys.virgin: empty
I'll trade your rain for our nasty thunderstorms and tornadoes.
mikea at mikea.ath.cx
Tired old sysadmin since 1964
More information about the MailScanner