Package: file Version: 4.23-2 Severity: wishlist Tags: patch The following magic detects GNOME keyring files and decodes some interesting values from them:
# Magic for GNOME keyring files. # Josh Triplett <[EMAIL PROTECTED]> # # The use of pstring works around the inability to specify a # length-prefixed string with a length longer than a byte (Debian bug # #466032); most GNOME keyrings will probably have a name shorter than # 256 characters anyway. The use of a computed offset after the # pstring, rather than a much simpler relative offset from the # pstring, works around a file bug (Debian bug which makes the current # offset off by one after a pstring. 0 string GnomeKeyring\n\r\0\n GNOME keyring >&0 ubyte 0 \b, major version 0 >>&0 ubyte 0 \b, minor version 0 >>>&0 ubyte 0 \b, crypto type 0 (AEL) >>>&0 ubyte >0 \b, crypto type %hhu (unknown) >>>&1 ubyte 0 \b, hash type 0 (MD5) >>>&1 ubyte >0 \b, hash type %hhu (unknown) >>>&2 ubelong 0xFFFFFFFF \b, name NULL >>>&2 ubelong !0xFFFFFFFF >>>>&-4 ubelong >255 \b, name too long for file's pstring >>>>type >>>>&-4 ubelong <256 >>>>>&-1 pstring x \b, name "%s" >>>>&(&-4.L) ubeqdate x \b, last modified %s >>>>>&0 ubeqdate x \b, created %s >>>>>&8 ubelong &1 >>>>>>&0 ubelong x \b, locked if idle for %u seconds >>>>>&8 ubelong ^1 \b, not locked if idle >>>>>&16 ubelong x \b, hash iterations %u >>>>>&20 ubequad x \b, salt %llu >>>>>&44 ubelong x \b, %u items Example output (with hash iterations and salt omitted as potentially sensitive information about my keyrings): $ file ~/.gnome2/keyrings/* /home/josh/.gnome2/keyrings/default.keyring: GNOME keyring, major version 0, minor version 0, crypto type 0 (AEL), hash type 0 (MD5), name "default", last modified Sat Jul 30 18:39:51 2005, created Sat Jul 30 18:39:51 2005, not locked if idle, hash iterations ..., salt ..., 1 items /home/josh/.gnome2/keyrings/login.keyring: GNOME keyring, major version 0, minor version 0, crypto type 0 (AEL), hash type 0 (MD5), name "login", last modified Fri Nov 30 16:16:51 2007, created Fri Nov 30 16:16:51 2007, not locked if idle, hash iterations ..., salt ..., 4 items Feel free to comment out the lines printing the hash iterations and salt if you don't find them interesting enough to include in the output. - Josh Triplett -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages file depends on: ii libc6 2.7-8 GNU C Library: Shared libraries ii libmagic1 4.23-2 File type determination library us file recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]