Skip to content

Commit 6daa90a

Browse files
author
Tod Beardsley
committed
Msftidy: use binary on File.open always
msftidy is complaining, here: keylog_recorder.rb:116 - [WARNING] File.open without binary mode Not sure how this managed to hit upstream/master with msftidy warnings. Protip, use an msftidy pre-commit hook. We have just such a hook script in tools/dev, as a matter of fact, so it's just a symlink away: https://github.com/rapid7/metasploit-framework/blob/master/tools/dev/pre-commit-hook.rb
1 parent 8acabe4 commit 6daa90a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/post/osx/capture/keylog_recorder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def run
113113
"keylog", "text/plain", session, log, "keylog.log", "OSX keylog"
114114
)
115115
else
116-
File.open(self.loot_path, 'a') { |f| f.write(log) }
116+
File.open(self.loot_path, 'ab') { |f| f.write(log) }
117117
end
118118
print_status(log_a.map{ |a| a=~/([^\s]+)\s*$/; $1 }.join)
119119
print_status "Saved to #{self.loot_path}"

0 commit comments

Comments
 (0)