mldonkey-tasks
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-tasks] [task #5324] filetype recognition with libmagic


From: jave
Subject: [Mldonkey-tasks] [task #5324] filetype recognition with libmagic
Date: Wed, 15 Mar 2006 20:55:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051202 Fedora/1.5-0.fc4 Firefox/1.5

URL:
  <http://savannah.nongnu.org/task/?func=detailitem&item_id=5324>

                 Summary: filetype recognition with libmagic
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: jave
            Submitted on: Wed 03/15/06 at 20:55
                Category: None
                Priority: 1 - Later
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Should Start On: Wed 03/15/06 at 00:00
   Should be Finished on: Wed 03/15/06 at 00:00

    _______________________________________________________

Details:

It would be desirable to know the real filetype of a downloading file as soon
as possible. The filetype given by libmagic can then be compared with the file
extension. If they differ, say a "rar" is reaaly an "avi", the file is
probably a fake.

Libmagic, which is used in the unix "file" command can be used for this. 

There didnt seem to be any mainatined libmagic wrappers for ocaml, so I tried
generating them with swig. It worked fairly well.

See attached file with the experiment.

This should of course be a configure-time option.








    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?func=detailitem&item_id=5324>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]