Ensuring binary file reads, always.

git-svn-id: file:///home/svn/framework3/trunk@10501 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2010-09-28 03:13:10 +00:00
parent dc79d360ac
commit ddb2f71674
1 changed files with 1 additions and 1 deletions

View File

@ -1676,7 +1676,7 @@ class DBManager
# Imports loot, tasks, and reports from an MSFX ZIP report.
# XXX: This function is stupidly long. It needs to be refactored.
def import_msfx_collateral(args={}, &block)
data = File.open(args[:filename], "r") {|f| f.read(f.stat.size)}
data = File.open(args[:filename], "rb") {|f| f.read(f.stat.size)}
wspace = args[:wspace] || args['wspace'] || workspace
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
basedir = args[:basedir] || args['basedir'] || File.join(Msf::Config.install_root, "data", "msfx")