Metasploit mailing list archives

Re: Fwd: getting mime types


From: Robin Wood <robin () digininja org>
Date: Fri, 1 Feb 2013 21:45:27 +0000

On 1 February 2013 15:43, Stephen Haywood
<stephen () averagesecurityguy info>wrote:

Meant to send this to the list.


---------- Forwarded message ----------
From: Stephen Haywood <stephen () averagesecurityguy info>
Date: Fri, Feb 1, 2013 at 10:43 AM
Subject: Re: [framework] getting mime types
To: Robin Wood <robin () digininja org>


The mime type does not affect the stored file but if you are worried about
it, you could add a flag to the download function and let the user specify
whether the file should be downloaded as binary or text. If the download is
binary use application/octet-stream as the mime type, other wise use
text/plain. Another option is to download all files as binary and use
application/octet-stream.

I'm not actually downloading the file, I'm pulling it from a database.
Going to default it to octet stream.

I'll have a look at your blog post as well, the more info the better.

Robin


On Fri, Feb 1, 2013 at 10:06 AM, Robin Wood <robin () digininja org> wrote:

I've written a scrip to pull arbitrary files from a server, when I use
the store_loot function it wants a mime type. As the file can be anything,
how do I get the mime type?

I can't see anyone else doing it in any of the other auxiliary modules,
most are hard coded or do simple checks on the file extension.

Robin

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework




--
Stephen Haywood
Information Security Consultant
CISSP, GSEC, OSCP
T: @averagesecguy
W: averagesecurityguy.info



--
Stephen Haywood
Information Security Consultant
CISSP, GSEC, OSCP
T: @averagesecguy
W: averagesecurityguy.info

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework

Current thread: