]> granicus.if.org Git - file/log
file
11 years agoallow octal formats
Christos Zoulas [Tue, 26 Feb 2013 21:02:48 +0000 (21:02 +0000)]
allow octal formats

11 years agobetter debugging printfs
Christos Zoulas [Tue, 26 Feb 2013 18:25:00 +0000 (18:25 +0000)]
better debugging printfs

11 years ago- avoid 0 offset causing an infinite loop.
Christos Zoulas [Tue, 26 Feb 2013 18:24:43 +0000 (18:24 +0000)]
- avoid 0 offset causing an infinite loop.
- XXX: should limit indirect nesting.

11 years agofix stray return -1; from glen at delfi dot ee
Christos Zoulas [Tue, 26 Feb 2013 16:20:42 +0000 (16:20 +0000)]
fix stray return -1; from glen at delfi dot ee

11 years agoadd magic.h.in to the dist files. FILE5_13
Christos Zoulas [Fri, 22 Feb 2013 14:05:18 +0000 (14:05 +0000)]
add magic.h.in to the dist files.

11 years agobump version
Christos Zoulas [Fri, 22 Feb 2013 01:37:54 +0000 (01:37 +0000)]
bump version

11 years agofix previous, reading section name.
Christos Zoulas [Fri, 22 Feb 2013 01:35:49 +0000 (01:35 +0000)]
fix previous, reading section name.

11 years agorecognize panasonic channel list database (Joerg Jenderek)
Christos Zoulas [Thu, 21 Feb 2013 15:27:01 +0000 (15:27 +0000)]
recognize panasonic channel list database (Joerg Jenderek)

11 years agomore patches from Joerg Jenderek:
Christos Zoulas [Mon, 18 Feb 2013 18:45:41 +0000 (18:45 +0000)]
more patches from Joerg Jenderek:

For some Microsoft  initial program loaders (IPL) not only the locations
with the characteristic error messages changes.
But also the strings itself varies from "Invalid partition table"
to "Ungültige Partitionstabelle" or "Table de partition erronée"
depending on the language of the Microsoft operating system (for
english,german or french)
So for example file (wmbr-9m-fr.bin and mbr-win7.bin in sample directory
mbr_msdos ) are not characterized as "MBR" ( see output
mbr_msdos-5.12-old.txt )

So i removed the old tests for Microsoft DOS and Windows MBR  and replaced
them by  looking for \x33\xc0\x8e\xd0\xbc\x00\x7c , the characteristic
assembler instructions "xor ax,ax;mov ss,ax;mov sp,7c00"  according to
information of http://thestarman.pcministry.com/asm/mbr/
By this test line all inspected examples are identified as MS-MBR except
for hdimage-msdos3.21-es.mbr. This seem to belongs to Spanish Microsoft
MS-DOS version 3.21 .
So i add additional magic test for that special assembler instructions. By
looking for characteristic assembler instructions at offset 8 i was able to
identify MBR for  Microsoft version "DOS 2" until Windows 7 and display
this version information correctly.
For the old "DOS 2" only the Author name differs ("David Litton" , "A
Pehrsson" ; see samples hdimage-msdos2.11-sv.mbr and mbr-2.x.bin). So i
display this information too.
If available an non zero disk signature at offset 0x1B8 is displayed,
whereas in old version this was called unspecified by ", Serial" with
sometimes wrong typ ubelong (See also
http://en.wikipedia.org/wiki/MBR_disk_signature#ID)

According to http://mirror.href.com/thestarman/asm/mbr/mystery.htm
the physical drive number and a time stamp is stored in some MBR versions
during creation.So i display this information too like in mbr-3.3_myth.bin.

error messages inside mbr are printed for example by assembler
instructions: mov si,06nn;...;int 10
where nn is string offset varying for different languages.
So i use indirect  offset to display this various messages like for german
"Ungültige Partitionstabelle"
"Fehler beim Laden des Betriebssystems"
"Betriebssystem fehlt"
or for english
"Invalid partition table"
"Error loading operating system"
"Missing operating system"
i also use this strings or different offset values to characterise the
different language variants.

After changing filesystems magic by file-5.12-filesystems-msdos-mbr.diff
these files are identified correctly as "MS-MBR" (see output
mbr_msdos-5.12-new.txt).

All diffs, output and sample files are stored under
http://mitglied.multimania.de/jenderek/file/

11 years agonew gpt magic from Rogier Goossens
Christos Zoulas [Mon, 18 Feb 2013 18:31:09 +0000 (18:31 +0000)]
new gpt magic from Rogier Goossens

11 years ago- use pread
Christos Zoulas [Mon, 18 Feb 2013 15:40:59 +0000 (15:40 +0000)]
- use pread
- add reading of section header names to determine if an ELF file is stripped
  (Jan Kaluza)

11 years ago- Don't set the unsigned flag if the type was not unsigned
Christos Zoulas [Sun, 17 Feb 2013 22:29:40 +0000 (22:29 +0000)]
- Don't set the unsigned flag if the type was not unsigned
- Add missing names in the type array, and assertion to make sure they
  are kept consistent

11 years ago- don't subtract o from nbytes; mcopy deals with adjusting the length when
Christos Zoulas [Sun, 17 Feb 2013 22:28:27 +0000 (22:28 +0000)]
- don't subtract o from nbytes; mcopy deals with adjusting the length when
  considering the offset.
- add a bit more verbose debugging.

11 years agofix split lines
Christos Zoulas [Sun, 17 Feb 2013 21:37:30 +0000 (21:37 +0000)]
fix split lines

11 years agofix incorrect offset.
Christos Zoulas [Fri, 8 Feb 2013 17:25:57 +0000 (17:25 +0000)]
fix incorrect offset.

11 years agostart search after the signature
Christos Zoulas [Fri, 8 Feb 2013 17:25:16 +0000 (17:25 +0000)]
start search after the signature

11 years agoremove junk entries
Christos Zoulas [Fri, 8 Feb 2013 17:24:06 +0000 (17:24 +0000)]
remove junk entries

11 years agoadd android backups
Christos Zoulas [Fri, 8 Feb 2013 16:54:45 +0000 (16:54 +0000)]
add android backups

11 years agofix all non-ascii characters.
Christos Zoulas [Wed, 6 Feb 2013 14:18:52 +0000 (14:18 +0000)]
fix all non-ascii characters.

11 years agoNormalize name to ascii
Christos Zoulas [Tue, 5 Feb 2013 15:20:47 +0000 (15:20 +0000)]
Normalize name to ascii

11 years agoconvert to octal
Christos Zoulas [Tue, 5 Feb 2013 13:55:22 +0000 (13:55 +0000)]
convert to octal

11 years agobump jpeg.
Christos Zoulas [Mon, 4 Feb 2013 15:50:03 +0000 (15:50 +0000)]
bump jpeg.

11 years agoDon't confuse NTFS filesystems with Hitachi COFF (Joerg Jenderek)
Christos Zoulas [Tue, 29 Jan 2013 19:31:33 +0000 (19:31 +0000)]
Don't confuse NTFS filesystems with Hitachi COFF (Joerg Jenderek)
The hitachi coff magic is too weak and perhaps it should be commented out?

11 years agomore disk formats from John Elliott
Christos Zoulas [Sat, 26 Jan 2013 18:17:28 +0000 (18:17 +0000)]
more disk formats from John Elliott

11 years agobump mime desc
Christos Zoulas [Fri, 25 Jan 2013 23:07:19 +0000 (23:07 +0000)]
bump mime desc

11 years agofix mime types. (Thomas Ledoux)
Christos Zoulas [Fri, 25 Jan 2013 23:04:37 +0000 (23:04 +0000)]
fix mime types. (Thomas Ledoux)

11 years agoCheck sizeof long long from Werner Fink.
Christos Zoulas [Thu, 24 Jan 2013 13:37:51 +0000 (13:37 +0000)]
Check sizeof long long from Werner Fink.

11 years agoPR/234: +40 is a lot, for the boot sector, it wins over linux kernels which
Christos Zoulas [Wed, 23 Jan 2013 19:03:41 +0000 (19:03 +0000)]
PR/234: +40 is a lot, for the boot sector, it wins over linux kernels which
is bad. Bump it down to +30

11 years agofix wrapped line
Christos Zoulas [Wed, 23 Jan 2013 17:47:17 +0000 (17:47 +0000)]
fix wrapped line

11 years agoinclude the offset
Christos Zoulas [Wed, 23 Jan 2013 17:45:51 +0000 (17:45 +0000)]
include the offset

11 years agoPR/233: Magic contains embedded space.
Christos Zoulas [Tue, 22 Jan 2013 18:52:02 +0000 (18:52 +0000)]
PR/233: Magic contains embedded space.

11 years agoPR/232: Jan Kaluza: JPEG files are detected as Minix filesystems
Christos Zoulas [Tue, 22 Jan 2013 18:29:58 +0000 (18:29 +0000)]
PR/232: Jan Kaluza: JPEG files are detected as Minix filesystems

12 years agore-factor gnome.
Christos Zoulas [Wed, 16 Jan 2013 13:53:10 +0000 (13:53 +0000)]
re-factor gnome.

12 years agomore fixes from Guy Harris
Christos Zoulas [Sat, 12 Jan 2013 03:09:51 +0000 (03:09 +0000)]
more fixes from Guy Harris

12 years agomention fsmagic fix.
Christos Zoulas [Fri, 11 Jan 2013 19:50:03 +0000 (19:50 +0000)]
mention fsmagic fix.

12 years agoAdd a space if we printed some magic.
Christos Zoulas [Fri, 11 Jan 2013 19:46:55 +0000 (19:46 +0000)]
Add a space if we printed some magic.

12 years agoupdate source list
Christos Zoulas [Fri, 11 Jan 2013 16:51:01 +0000 (16:51 +0000)]
update source list

12 years ago- Warn about continuation levels which are not contiguous when increasing.
Christos Zoulas [Fri, 11 Jan 2013 16:45:23 +0000 (16:45 +0000)]
- Warn about continuation levels which are not contiguous when increasing.
- Fix broken magic files discovered by that test.

12 years agoMore fixes
Christos Zoulas [Thu, 10 Jan 2013 23:09:51 +0000 (23:09 +0000)]
More fixes

12 years agoadd "public" because this is needed outside libmagic (in file)
Christos Zoulas [Thu, 10 Jan 2013 23:06:04 +0000 (23:06 +0000)]
add "public" because this is needed outside libmagic (in file)

12 years agouse BUILT_SOURCES
Christos Zoulas [Thu, 10 Jan 2013 00:50:33 +0000 (00:50 +0000)]
use BUILT_SOURCES

12 years agonew a.out file
Christos Zoulas [Wed, 9 Jan 2013 22:37:38 +0000 (22:37 +0000)]
new a.out file

12 years agoFrom Guy Harris:
Christos Zoulas [Wed, 9 Jan 2013 22:37:23 +0000 (22:37 +0000)]
From Guy Harris:

There are several entries in the magic database for files that begin
with a 4-byte big-endian or little-endian octal 407, 410, and 413,
because several different flavors of UN*X used, at least in their
earliest days, the 32-bit a.out format with the standard magic numbers.

I've removed them and placed entries in a new "aout" file, and just
labeled them as "little-endian 32-bit" and "big-endian 32-bit"
executables, so that, for example, UNIX/32V VAX binaries aren't
misidentified as 386 binaries, or *vice versa*; unless we look at the
actual code, or find some other way of distinguishing between them,
there's no way to identify those as anything other than little-endian
32-bit binaries.  I also commented out some entries in "unknown" that
would have matched the same files that other entries would also have
matched.

I've also added "a.out" to the description strings for several a.out
file formats.

As "mips" contained some of those entries, as a result of being a bit of
a mix between MIPS stuff and SGI stuff, I also moved all the stuff that
has nothing to do with the MIPS architecture into "sgi".  (Yes, SGI did
own MIPS Technologies for a while, but it didn't do so originally and
doesn't do so now, and the stuff that got moved has nothing to do with
the MIPS architecture.)

In addition, I cleaned up the "ar" archive file entries, removing some
duplicates, fixing some "random" archive checks (they were using an
offset of 8 for older archive formats, but in those older archive
formats the archive entries start at an earlier offset, so the name of
the first entry is at an offset of 2 or 4), and adding an entry for the
entry Apple's ranlib adds (it has a longer name, and OS X uses the BSD
flavor of the "portable" archive format, so the name is at an offset of
68 rather than 8).  I also added a comment to indicate what I suspect
"thin" archives are (a type of archive produced by GNU ar).

12 years agoAdd 5.2 from Steven Kreuzer
Christos Zoulas [Wed, 9 Jan 2013 16:23:17 +0000 (16:23 +0000)]
Add 5.2 from Steven Kreuzer

12 years agomerge assignments
Christos Zoulas [Wed, 9 Jan 2013 15:36:55 +0000 (15:36 +0000)]
merge assignments

12 years agoDocument {d,u}Q (Guy Harris)
Christos Zoulas [Wed, 9 Jan 2013 13:04:30 +0000 (13:04 +0000)]
Document {d,u}Q (Guy Harris)

12 years agoonly allow one digit chars, but allow any other character except a digit
Christos Zoulas [Wed, 9 Jan 2013 13:03:41 +0000 (13:03 +0000)]
only allow one digit chars, but allow any other character except a digit
after them. (Guy Harris)

12 years agoadd fulldump bit (Lorinczy Zsigmond)
Christos Zoulas [Tue, 8 Jan 2013 20:13:01 +0000 (20:13 +0000)]
add fulldump bit (Lorinczy Zsigmond)

12 years agomerge duplicate entries
Christos Zoulas [Tue, 8 Jan 2013 17:02:50 +0000 (17:02 +0000)]
merge duplicate entries

12 years agoadd raw, from Alfredo Ortega
Christos Zoulas [Tue, 8 Jan 2013 03:06:50 +0000 (03:06 +0000)]
add raw, from Alfredo Ortega

12 years agoadd: International Color Consortium profile file magic
Christos Zoulas [Tue, 8 Jan 2013 01:43:18 +0000 (01:43 +0000)]
add: International Color Consortium profile file magic

12 years agoImplement [du]{1,2,4,8} (Guy Harris)
Christos Zoulas [Tue, 8 Jan 2013 01:37:01 +0000 (01:37 +0000)]
Implement [du]{1,2,4,8} (Guy Harris)

12 years agofix bitcode data (Guy Harris)
Christos Zoulas [Tue, 8 Jan 2013 01:34:38 +0000 (01:34 +0000)]
fix bitcode data (Guy Harris)

12 years agocheck for the right magic_version()
Christos Zoulas [Mon, 7 Jan 2013 18:20:19 +0000 (18:20 +0000)]
check for the right magic_version()

12 years ago- always initialize ml->map
Christos Zoulas [Mon, 7 Jan 2013 18:15:15 +0000 (18:15 +0000)]
- always initialize ml->map
- free map

12 years agore-do the map and allocation of magic entries to simplify things
Christos Zoulas [Mon, 7 Jan 2013 18:06:40 +0000 (18:06 +0000)]
re-do the map and allocation of magic entries to simplify things

12 years agoPR/228: Fix magic deallocation when the magic file is not mmapped. This is the
Christos Zoulas [Mon, 7 Jan 2013 02:11:22 +0000 (02:11 +0000)]
PR/228: Fix magic deallocation when the magic file is not mmapped. This is the
case for windows.

12 years agoPR/225: beat x86 boot sector
Christos Zoulas [Sun, 6 Jan 2013 21:26:48 +0000 (21:26 +0000)]
PR/225: beat x86 boot sector

12 years ago$> does not work all the time
Christos Zoulas [Sun, 6 Jan 2013 21:14:17 +0000 (21:14 +0000)]
$> does not work all the time

12 years agoimplement magic_version
Christos Zoulas [Sun, 6 Jan 2013 21:10:39 +0000 (21:10 +0000)]
implement magic_version

12 years agodocument magic_version
Christos Zoulas [Sun, 6 Jan 2013 20:56:52 +0000 (20:56 +0000)]
document magic_version

12 years agothe continuation error is a magic error.
Christos Zoulas [Sun, 6 Jan 2013 20:36:18 +0000 (20:36 +0000)]
the continuation error is a magic error.

12 years agoPR/229: Fix not portable pointer comparison code.
Christos Zoulas [Sun, 6 Jan 2013 20:22:16 +0000 (20:22 +0000)]
PR/229: Fix not portable pointer comparison code.

12 years agoUse "name" and "use" so that we have only one set of entries for pcap
Christos Zoulas [Sun, 6 Jan 2013 01:11:04 +0000 (01:11 +0000)]
Use "name" and "use" so that we have only one set of entries for pcap
files, and add a bunch of additional link-layer header types. (Guy Harris)

12 years agoadd more link layer types (Guy Harris)
Christos Zoulas [Sun, 6 Jan 2013 01:09:42 +0000 (01:09 +0000)]
add more link layer types (Guy Harris)

12 years agofix processor offsets (Guy Harris)
Christos Zoulas [Fri, 4 Jan 2013 23:35:53 +0000 (23:35 +0000)]
fix processor offsets (Guy Harris)

12 years agoAdd llvm bitcode objects; from Guy Harris
Christos Zoulas [Fri, 4 Jan 2013 23:31:59 +0000 (23:31 +0000)]
Add llvm bitcode objects; from Guy Harris

12 years agoremove ?
Christos Zoulas [Fri, 4 Jan 2013 23:31:11 +0000 (23:31 +0000)]
remove ?

12 years agouse "universal binary". From Guy Harris
Christos Zoulas [Fri, 4 Jan 2013 23:27:55 +0000 (23:27 +0000)]
use "universal binary". From Guy Harris

12 years agoPatch from Guy Harris, fixing a typo in the name, masks, and unhandled archs
Christos Zoulas [Fri, 4 Jan 2013 21:46:59 +0000 (21:46 +0000)]
Patch from Guy Harris, fixing a typo in the name, masks, and unhandled archs

12 years agoescape the period in the keywords
Christos Zoulas [Fri, 4 Jan 2013 17:23:28 +0000 (17:23 +0000)]
escape the period in the keywords

12 years agoNeed to pass the returnval that the child match determined in the use case.
Christos Zoulas [Fri, 4 Jan 2013 16:37:54 +0000 (16:37 +0000)]
Need to pass the returnval that the child match determined in the use case.
This broke the elf mime printing, where softmagic returned a non-match although
the child match() actually printed something.

12 years agonew sentence, new line
Christos Zoulas [Fri, 4 Jan 2013 15:39:22 +0000 (15:39 +0000)]
new sentence, new line

12 years agouse case insensitive match
Christos Zoulas [Fri, 4 Jan 2013 14:22:07 +0000 (14:22 +0000)]
use case insensitive match

12 years agofix bogus magic FILE5_12
Christos Zoulas [Fri, 4 Jan 2013 00:47:02 +0000 (00:47 +0000)]
fix bogus magic

12 years agolint fixes
Christos Zoulas [Thu, 3 Jan 2013 23:11:38 +0000 (23:11 +0000)]
lint fixes

12 years agowelcome to 5.12
Christos Zoulas [Thu, 3 Jan 2013 16:05:24 +0000 (16:05 +0000)]
welcome to 5.12

12 years agomissing backslash
Christos Zoulas [Thu, 3 Jan 2013 16:00:42 +0000 (16:00 +0000)]
missing backslash

12 years agoPR/224: Add geospatial designs recognition. Guess on little endian.
Christos Zoulas [Wed, 2 Jan 2013 15:27:53 +0000 (15:27 +0000)]
PR/224: Add geospatial designs recognition. Guess on little endian.

12 years agoadd .DS_Store files
Christos Zoulas [Thu, 27 Dec 2012 15:43:23 +0000 (15:43 +0000)]
add .DS_Store files

12 years agoadded keepass
Christos Zoulas [Mon, 24 Dec 2012 22:14:56 +0000 (22:14 +0000)]
added keepass

12 years agoPR/220: Add MacOS alias files
Christos Zoulas [Fri, 21 Dec 2012 16:41:07 +0000 (16:41 +0000)]
PR/220: Add MacOS alias files

12 years agoadd uterus
Christos Zoulas [Tue, 18 Dec 2012 18:54:09 +0000 (18:54 +0000)]
add uterus

12 years agoPR/200: Add uterus magic
Christos Zoulas [Tue, 18 Dec 2012 18:53:32 +0000 (18:53 +0000)]
PR/200: Add uterus magic

12 years agoPR/216: Reduce strength of x86 boot sector, bump pbm files adding width and
Christos Zoulas [Tue, 18 Dec 2012 17:28:43 +0000 (17:28 +0000)]
PR/216: Reduce strength of x86 boot sector, bump pbm files adding width and
height printing (Jan Kaluza)

12 years agoPR/216: P2 files are not binary.
Christos Zoulas [Tue, 18 Dec 2012 17:25:54 +0000 (17:25 +0000)]
PR/216: P2 files are not binary.

12 years agoelf capabilities fix (Jan Kaluza)
Christos Zoulas [Thu, 13 Dec 2012 13:48:31 +0000 (13:48 +0000)]
elf capabilities fix (Jan Kaluza)

12 years agoRecognize more mbr types from Joerg Jenderek
Christos Zoulas [Sun, 9 Dec 2012 17:49:00 +0000 (17:49 +0000)]
Recognize more mbr types from Joerg Jenderek

12 years agofix typo; add mariadb
Christos Zoulas [Sun, 9 Dec 2012 17:11:08 +0000 (17:11 +0000)]
fix typo; add mariadb

12 years agofix typo
Christos Zoulas [Sun, 9 Dec 2012 17:10:03 +0000 (17:10 +0000)]
fix typo

12 years agoadd lfs
Christos Zoulas [Sat, 1 Dec 2012 19:14:28 +0000 (19:14 +0000)]
add lfs

12 years agomove minix after ext<n> because ext gets misadentified as minix, for specific
Christos Zoulas [Fri, 30 Nov 2012 18:11:54 +0000 (18:11 +0000)]
move minix after ext<n> because ext gets misadentified as minix, for specific
values of free inodes (from Werner Fink):

http://www.debacher.de/ublog/2010/06/
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:minix
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/518582
http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg2057379.html
https://lkml.org/lkml/1996/4/18/38

12 years agoPR/214: Form the help for nv options dynamically instead of keeping a stale
Christos Zoulas [Wed, 21 Nov 2012 16:27:39 +0000 (16:27 +0000)]
PR/214: Form the help for nv options dynamically instead of keeping a stale
copy.

12 years agoFix uninitialized variable.
Christos Zoulas [Wed, 21 Nov 2012 16:27:07 +0000 (16:27 +0000)]
Fix uninitialized variable.

12 years agoadd armv7 from Francis Dupont
Christos Zoulas [Tue, 13 Nov 2012 14:55:44 +0000 (14:55 +0000)]
add armv7 from Francis Dupont

12 years agoAdd thin archive support.
Christos Zoulas [Fri, 9 Nov 2012 22:59:30 +0000 (22:59 +0000)]
Add thin archive support.

12 years agonew patch from Joerg Jenderek
Christos Zoulas [Thu, 8 Nov 2012 21:42:46 +0000 (21:42 +0000)]
new patch from Joerg Jenderek

12 years agodocument ^name in use
Christos Zoulas [Wed, 7 Nov 2012 20:29:27 +0000 (20:29 +0000)]
document ^name in use

12 years agocheck the return value of dup(2)
Christos Zoulas [Wed, 7 Nov 2012 17:54:48 +0000 (17:54 +0000)]
check the return value of dup(2)

12 years agoadd aarch64
Christos Zoulas [Tue, 6 Nov 2012 20:43:52 +0000 (20:43 +0000)]
add aarch64