NetBSD Problem Report #38427

From christianbiere@gmx.de  Mon Apr 14 16:45:05 2008
Return-Path: <christianbiere@gmx.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id E154D63B898
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Apr 2008 16:45:04 +0000 (UTC)
Message-Id: <20080414165202.GA10335@cyclonus>
Date: Mon, 14 Apr 2008 18:52:02 +0200
From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@gnats.NetBSD.org
Subject: file(1): magic patterns for BitTorrent files
X-Send-Pr-Version: 3.95

>Number:         38427
>Category:       misc
>Synopsis:       file(1): more magic patterns for BitTorrent files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    christos
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 14 17:56:26 +0000 2008
>Closed-Date:    Mon Apr 13 16:20:42 +0000 2020
>Last-Modified:  Mon Apr 13 16:20:42 +0000 2020
>Originator:     Christian Biere
>Release:        NetBSD 4.99.7
>Organization:
>Environment:
System: NetBSD cyclonus 4.99.7 NetBSD 4.99.7 (STARSCREAM) #4: Wed Dec 27 02:37:42 CET 2006 src@cyclonus:/o/NetBSD/obj/sys/arch/i386/compile/STARSCREAM i386

Architecture: i386
Machine: i386
>Description:

file(1) does not recognize all BitTorrent files because BitTorrent files are
nothing but "raw" bencoded dictionaries with no actual magic header and items
in no specific order. The current known magic pattern relies on a specific
order of items in this dictionary. Most tools seem to output files matching
this assumption but some popular tools don't. I'm providing two more patterns
extracted from actual files I came across. Of course, as explained this isn't
exhaustive.

>How-To-Repeat:
>Fix:

magic:
0	string	d7:comment	BitTorrent file
0	string	d4:info		BitTorrent file

magic.mime:
0	string		d7:comment		application/x-bittorrent
0	string		d4:info			application/x-bittorrent


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: misc-bug-people->christos
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Wed, 29 May 2019 00:38:33 +0000
Responsible-Changed-Why:
Christos, what do you think?


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 13 Apr 2020 16:20:42 +0000
State-Changed-Why:
Committed :-)
https://github.com/file/file/commit/18139c815234829eab7e9595041c915ecb4f98a8


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.