Update BrowserDetails to store textual OID-style key/value data
This commit is contained in:
@@ -9,9 +9,9 @@ class Detect_activex < BeEF::Core::Command
|
||||
content = {}
|
||||
content['activex'] = @datastore['activex']
|
||||
save content
|
||||
if @datastore['results'] =~ /^activex=(Yes|No)/
|
||||
bd = BeEF::Core::Models::BrowserDetails.set(@datastore['beefhook'], 'HasActiveX', $1)
|
||||
end
|
||||
if @datastore['results'] =~ /^activex=(Yes|No)/
|
||||
bd = BeEF::Core::Models::BrowserDetails.set(@datastore['beefhook'], 'browser.capabilities.activex', $1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#
|
||||
class Detect_vlc < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['vlc'] = @datastore['vlc']
|
||||
save content
|
||||
end
|
||||
def post_execute
|
||||
content = {}
|
||||
content['vlc'] = @datastore['vlc']
|
||||
save content
|
||||
if @datastore['results'] =~ /^vlc=(Yes|No)/
|
||||
bd = BeEF::Core::Models::BrowserDetails.set(@datastore['beefhook'], 'browser.capabilities.vlc', $1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -9,9 +9,9 @@ class Detect_wmp < BeEF::Core::Command
|
||||
content = {}
|
||||
content['wmp'] = @datastore['wmp']
|
||||
save content
|
||||
if @datastore['results'] =~ /^wmp=(Yes|No)/
|
||||
bd = BeEF::Core::Models::BrowserDetails.set(@datastore['beefhook'], 'HasWMP', $1)
|
||||
end
|
||||
if @datastore['results'] =~ /^wmp=(Yes|No)/
|
||||
bd = BeEF::Core::Models::BrowserDetails.set(@datastore['beefhook'], 'browser.capabilities.wmp', $1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -24,7 +24,7 @@ class Spyder_eye < BeEF::Core::Command
|
||||
# save screenshot file
|
||||
begin
|
||||
timestamp = Time.now.localtime.strftime("%Y-%m-%d_%H-%M-%S")
|
||||
ip = BeEF::Core::Models::BrowserDetails.get(session_id, 'IP')
|
||||
ip = BeEF::Core::Models::BrowserDetails.get(session_id, 'browser.ipaddress')
|
||||
filename = "#{$home_dir}/screenshot_#{ip}_-_#{timestamp}_#{@datastore['cid']}.png"
|
||||
File.open(filename, 'wb') do |file|
|
||||
data = @datastore['results'].gsub(/^image=data:image\/(png|jpg);base64,/, "")
|
||||
|
||||
Reference in New Issue
Block a user