From 05dbee7a94bf611e9ec45faecc5797e96a7ab536 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sun, 15 May 2016 00:52:26 -0500 Subject: [PATCH] Do not save empty keystrokes --- plugins/beholder.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/beholder.rb b/plugins/beholder.rb index fd74f1979b..8e4ea7b3ed 100644 --- a/plugins/beholder.rb +++ b/plugins/beholder.rb @@ -98,6 +98,7 @@ class Plugin::Beholder < Msf::Plugin end def store_keystrokes(sid, data) + return unless data.length > 0 filename = capture_filename(sid) + "_keystrokes.txt" ::File.open(::File.join(self.config[:base], filename), "wb") {|fd| fd.write(data) } session_log(sid, "captured keystrokes to #{filename}")