Add rspec files to make sure the javascript files are loadable.
parent
8579cb8322
commit
73b8eb0f83
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue