[TriLUG] Scanning for executables
Rick DeNatale
rick.denatale at gmail.com
Wed Jan 4 12:56:28 EST 2006
On 1/4/06, Ian Kilgore <ian at trilug.org> wrote:
> Well, ELF files have this handy little magic number: 7F 45 4C 46
> (Which is some undisplayable character, followed by 'ELF').. the ELF
> headers will usually be very similar to each other (Just taking a look
> at a few files in /bin, I see:
>
> 7F 45 4C 46 01 01 01 00 00 00 00 00 00 00 00 00
> 02 00 03 00 01 00 00 00
file is probably the easiest way to do this.
man file
The file command looks at /usr/share/misc/file/magic to determine how
to classify files. Details of the fairly simple format are available
via.
man magic
--
Rick DeNatale
Visit the Project Mercury Wiki Site
http://www.mercuryspacecraft.com/
More information about the TriLUG
mailing list