Add the new rspec files
parent
ea56c4914c
commit
135648c171
|
@ -0,0 +1,16 @@
|
|||
require 'rex/exploitation/js'
|
||||
|
||||
describe Rex::Exploitation::Js::AddonsDetect do
|
||||
|
||||
context "Class methods" do
|
||||
|
||||
context ".initialize" do
|
||||
it "should load the Addons Detect javascript" do
|
||||
js = Rex::Exploitation::Js::AddonsDetect.new.to_s
|
||||
js.should =~ /window\.addons_detect/
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,30 @@
|
|||
require 'rex/exploitation/js'
|
||||
|
||||
describe Rex::Exploitation::Js::Memory do
|
||||
|
||||
context "Class methods" do
|
||||
|
||||
context ".mstime_malloc" do
|
||||
it "should load the mstime_malloc javascript" do
|
||||
js = Rex::Exploitation::Js::Memory.mstime_malloc
|
||||
js.should =~ /function mstime_malloc/
|
||||
end
|
||||
end
|
||||
|
||||
context ".property_spray" do
|
||||
it "should load the property_spray javascript" do
|
||||
js = Rex::Exploitation::Js::Memory.property_spray
|
||||
js.should =~ /function sprayHeap/
|
||||
end
|
||||
end
|
||||
|
||||
context ".heap_spray" do
|
||||
it "should load the heap_spray javascript" do
|
||||
js = Rex::Exploitation::Js::Memory.heap_spray
|
||||
js.should =~ /function sprayHeap/
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
require 'rex/exploitation/js'
|
||||
|
||||
describe Rex::Exploitation::Js::Network do
|
||||
|
||||
context "Class methods" do
|
||||
|
||||
context ".ajax_download" do
|
||||
it "should load the ajax_download javascript" do
|
||||
js = Rex::Exploitation::Js::Network.ajax_download
|
||||
js.should =~ /function ajax_download/
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
require 'rex/exploitation/js'
|
||||
|
||||
describe Rex::Exploitation::Js::OSDetect do
|
||||
|
||||
context "Class methods" do
|
||||
|
||||
context ".initialize" do
|
||||
it "should load the OSDetect javascript" do
|
||||
js = Rex::Exploitation::Js::OSDetect.new.to_s
|
||||
js.should =~ /window\.os_detect/
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
require 'rex/exploitation/js'
|
||||
|
||||
describe Rex::Exploitation::Js::Utils do
|
||||
|
||||
context "Class methods" do
|
||||
|
||||
context ".base64" do
|
||||
it "should load the base64 javascript" do
|
||||
js = Rex::Exploitation::Js::Utils.base64
|
||||
js.should =~ /encode : function/
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue