Added hyphen to separate ip and date in screenshot filename

This commit is contained in:
mgeeky
2016-04-15 10:09:21 +02:00
parent 6cc5a822d7
commit ffdb942cf1

View File

@@ -25,7 +25,7 @@ class Spyder_eye < BeEF::Core::Command
begin
timestamp = Time.now.getutc.to_s.gsub(/[ :]/, ' ' => '_', ':' => '-').chomp('_UTC')
ip = BeEF::Core::Models::BrowserDetails.get(session_id, 'IP')
filename = "screenshot_#{ip}_#{timestamp}_#{@datastore['cid']}.png"
filename = "screenshot_#{ip}_-_#{timestamp}_#{@datastore['cid']}.png"
File.open(filename, 'wb') do |file|
data = @datastore['results'].gsub(/^image=data:image\/(png|jpg);base64,/, "")
file.write(Base64.decode64(data))