From 7e3ee5fc500f2480d2f273b2e901955c30cf7b23 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sun, 1 Feb 2015 02:06:52 +0000 Subject: [PATCH] Record OS --- modules/host/get_internal_ip_webrtc/module.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/host/get_internal_ip_webrtc/module.rb b/modules/host/get_internal_ip_webrtc/module.rb index 466cbdb12..7d497d1b7 100755 --- a/modules/host/get_internal_ip_webrtc/module.rb +++ b/modules/host/get_internal_ip_webrtc/module.rb @@ -20,11 +20,12 @@ class Get_internal_ip_webrtc < BeEF::Core::Command if @datastore['results'] =~ /IP is ([\d\.,]+)/ ips = $1.to_s.split(/,/) if !ips.nil? && !ips.empty? + os = BeEF::Core::Models::BrowserDetails.get(session_id, 'OsName') ips.uniq.each do |ip| next unless ip =~ /^[\d\.]+$/ next if ip =~ /^0\.0\.0\.0$/ print_debug("Hooked browser has network interface #{ip}") - r = BeEF::Core::Models::NetworkHost.new(:hooked_browser_id => session_id, :ip => ip, :cid => cid) + r = BeEF::Core::Models::NetworkHost.new(:hooked_browser_id => session_id, :ip => ip, :os => os, :cid => cid) r.save end end