On Tue, Nov 04, 2008 at 11:53:46AM +0100, Dominik 'Rathann' Mierzejewski wrote:
On Tuesday, 04 November 2008 at 11:51, Patrice Dumas wrote:
> On Tue, Nov 04, 2008 at 10:42:32AM +0000, Andrew Haley wrote:
> >
> > Hold on, how do you know that something is a "binary" ? What if,
for
> > example, it's an image bitmap? In the general case it's not possible
> > to tell if something is source or binary.
>
> At least ELF files could be found out.
So could Windows binaries (executables, DLLs, C# blobs) and Java JARs.
File isn't very good at detecting java code, and it only see jar as Zip
archive, and .class file as data. But using the extension + the fact
that it is a zip archive may be a safe bet.
--
Pat