/spec/lib/rex/exploitation/js/detect_spec.rb
https://github.com/debbiemezyene/metasploit-framework · Ruby · 30 lines · 23 code · 7 blank · 0 comment · 0 complexity · 7836d9f112c798db5ddb9930575ba7aa MD5 · raw file
- require 'rex/exploitation/js'
- describe Rex::Exploitation::Js::Detect do
- context "Class methods" do
- context ".os" do
- it "should load the OS detection in Javascript" do
- js = Rex::Exploitation::Js::Detect.os.to_s
- js.should =~ /window\.os_detect/
- end
- end
- context ".ie_addons" do
- it "should load the IE Addons detection in Javascript" do
- js = Rex::Exploitation::Js::Detect.ie_addons.to_s
- js.should =~ /window\.ie_addons_detect/
- 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
- js.should =~ /window\.misc_addons_detect/
- end
- end
- end
- end