metasploit-framework/spec/lib/rex/exploitation/js/detect_spec.rb

31 lines
722 B
Ruby
Raw Normal View History

2013-10-22 06:11:11 +00:00
require 'rex/exploitation/js'
describe Rex::Exploitation::Js::Detect do
context "Class methods" do
context ".os" do
2013-11-07 06:54:52 +00:00
it "should load the OS detection in Javascript" do
2013-10-22 06:11:11 +00:00
js = Rex::Exploitation::Js::Detect.os.to_s
2014-09-21 02:29:13 +00:00
js.should =~ /os_detect/
2013-10-22 06:11:11 +00:00
end
end
2013-11-05 07:14:12 +00:00
context ".ie_addons" do
2013-11-07 06:54:52 +00:00
it "should load the IE Addons detection in Javascript" do
2013-11-05 07:14:12 +00:00
js = Rex::Exploitation::Js::Detect.ie_addons.to_s
2014-09-21 02:29:13 +00:00
js.should =~ /ie_addons_detect/
2013-11-07 06:54:52 +00:00
end
end
context ".misc_addons" do
it "should load the misc Addons detection in Javascript" do
js = Rex::Exploitation::Js::Detect.misc_addons.to_s
2014-09-21 02:29:13 +00:00
js.should =~ /misc_addons_detect/
2013-10-22 06:11:11 +00:00
end
end
end
end