Skip to content

Commit

Permalink
fix some silly input/output translation bugs with msfencode
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/svn/framework3/trunk@11326 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information
jduck committed Dec 14, 2010
1 parent d12be5b commit ebd2573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion msfencode
Expand Up @@ -132,7 +132,7 @@ $args.parse(ARGV) { |opt, idx, val|
case opt
when "-i"
begin
input = File.new(val)
input = File.open(val, 'rb')
rescue
$stderr.puts(OutError + "Failed to open file #{val}: #{$!}")
exit
Expand Down Expand Up @@ -225,6 +225,7 @@ case cmd
$stderr.puts(OutError + "Invalid encoder specified.")
end
when "encode"
input.binmode # ensure its in binary mode
buf = input.read

encoders.each { |enc|
Expand Down

0 comments on commit ebd2573

Please sign in to comment.