From: Sergey Vlasov <vsu@altlinux.ru> To: sisyphus@lists.altlinux.org Subject: Re: [sisyphus] Слишком "новый" zip? Date: Tue, 21 Dec 2010 21:42:20 +0300 Message-ID: <20101221184220.GA5790@atlas.home> (raw) In-Reply-To: <ieqe7l$8gb$1@dough.gmane.org> [-- Attachment #1: Type: text/plain, Size: 1264 bytes --] On Tue, Dec 21, 2010 at 05:39:49PM +0300, Alexei V. Mezin wrote: > Прислали файл, zip-архив. Но mc в него не заходит, и > > [alexei@threebears tmp]$ file ./3d_for_Dyshkin.zip > ./3d_for_Dyshkin.zip: data > > > При этом unzip отображает его содержимое и распаковывает. > > [alexei@threebears tmp]$ head -c 20 ./3d_for_Dyshkin.zip > PPKЈu”= Вывод hexdump -C -n64 $file был бы полезнее. > Сигнатура и правда какая-то новая. Вероятнее всего, дело не в новой сигнатуре, а в том, что в начало zip-файла можно добавить любое количество произвольных данных, и это не помешает unzip распаковать этот архив - каталог архива ищется в конце файла, а не в начале (правда, в конце может быть до 64 КБ комментариев к архиву, поэтому всё равно приходится выполнять поиск блока с нужной сигнатурой). Эта особенность формата ZIP позволяет, например, просто соединить исполняемый код для распаковки архива с архивным файлом, сохранив возможность распаковать такой файл обычным unzip, при этом не требуется знать особенности формата исполняемого файла для поиска начала архива. Однако полностью описать такой формат для распознавания утилитой file невозможно - в результате эта утилита может автоматически распознавать только "чистые" ZIP-архивы. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-12-21 18:42 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-21 14:39 Alexei V. Mezin 2010-12-21 14:54 ` [sisyphus] Слишком "=?utf-8?b?0L3QvtCy0YvQuQ==?=" zip? Sergey 2010-12-21 17:42 ` Alexei V. Mezin 2010-12-21 17:57 ` [sisyphus] Слишком "=?koi8-r?b?zs/X2co=?=" zip? Sergey 2010-12-21 18:09 ` Alexei V. Mezin 2010-12-21 18:14 ` Sergey 2010-12-21 20:04 ` Sergey 2010-12-21 21:01 ` Alexei V. Mezin 2010-12-21 21:56 ` Sergey 2010-12-23 12:05 ` Sergey 2010-12-23 20:10 ` Alexei V. Mezin 2010-12-24 7:06 ` Sergey 2010-12-21 18:42 ` Sergey Vlasov [this message] 2010-12-21 18:46 ` [sisyphus] Слишком "новый" zip? Sergey Vlasov 2010-12-21 18:58 ` Alexei V. Mezin 2010-12-21 19:03 ` Alexei V. Mezin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20101221184220.GA5790@atlas.home \ --to=vsu@altlinux.ru \ --cc=sisyphus@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git