Add rspec files to make sure the javascript files are loadable.

bug/bundler_fix
sinn3r 2013-10-18 15:14:26 -05:00
parent 8579cb8322
commit 73b8eb0f83
5 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,20 @@
require 'rex/exploitation/javascriptaddonsdetect'
describe Rex::Exploitation::JavascriptAddonsDetect do
subject(:ropdb) do
described_class.new
end
context "Class methods" do
context ".initialize" do
it "should load the Addons Detect javascript" do
js = Rex::Exploitation::JavascriptAddonsDetect.new.to_s
js.should =~ /window\.addons_detect/
end
end
end
end

View File

@ -0,0 +1,20 @@
require 'rex/exploitation/javascriptcrypto'
describe Rex::Exploitation::JavascriptCrypto do
subject(:ropdb) do
described_class.new
end
context "Class methods" do
context ".base64" do
it "should load the base64 javascript" do
js = Rex::Exploitation::JavascriptCrypto.base64
js.should =~ /encode : function/
end
end
end
end

View File

@ -0,0 +1,34 @@
require 'rex/exploitation/javascriptexploitation'
describe Rex::Exploitation::JavascriptExploitation do
subject(:ropdb) do
described_class.new
end
context "Class methods" do
context ".mstime_malloc" do
it "should load the mstime_malloc javascript" do
js = Rex::Exploitation::JavascriptExploitation.mstime_malloc
js.should =~ /function mstime_malloc/
end
end
context ".property_spray" do
it "should load the property_spray javascript" do
js = Rex::Exploitation::JavascriptExploitation.property_spray
js.should =~ /function sprayHeap/
end
end
context ".heap_spray" do
it "should load the heap_spray javascript" do
js = Rex::Exploitation::JavascriptExploitation.heap_spray
js.should =~ /function sprayHeap/
end
end
end
end

View File

@ -0,0 +1,20 @@
require 'rex/exploitation/javascriptnetwork'
describe Rex::Exploitation::JavascriptNetwork do
subject(:ropdb) do
described_class.new
end
context "Class methods" do
context ".ajax_download" do
it "should load the ajax_download javascript" do
js = Rex::Exploitation::JavascriptNetwork.ajax_download
js.should =~ /function ajax_download/
end
end
end
end

View File

@ -0,0 +1,20 @@
require 'rex/exploitation/javascriptosdetect'
describe Rex::Exploitation::JavascriptOSDetect do
subject(:ropdb) do
described_class.new
end
context "Class methods" do
context ".initialize" do
it "should load the OSDetect javascript" do
js = Rex::Exploitation::JavascriptOSDetect.new.to_s
js.should =~ /window\.os_detect/
end
end
end
end