Added hyphen to separate ip and date in screenshot filename
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user