Sha256: b4ba9fe8f2cd97646650ed4aa1daab0c464aa3a85e4bf52724ec3892932e1a50
Contents?: true
Size: 1.78 KB
Versions: 8
Compression:
Stored size: 1.78 KB
Contents
require 'spec_helper' describe Arachni::Platform::Fingerprinters::JSP do include_examples 'fingerprinter' context 'when the page has a .jsp extension' do it 'identifies it as JSP' do page = Arachni::Page.from_data( url: 'http://stuff.com/blah.jsp' ) platforms_for( page ).should include :jsp end end context 'when there is a JSESSIONID query parameter' do it 'identifies it as JSP' do page = Arachni::Page.from_data( url: 'http://stuff.com/blah?JSESSIONID=stuff' ) platforms_for( page ).should include :jsp end end context 'when there is a JSESSIONID cookie' do it 'identifies it as JSP' do page = Arachni::Page.from_data( url: 'http://stuff.com/blah', cookies: [Arachni::Cookie.new( url: 'http://stuff.com/blah', inputs: { 'JSESSIONID' => 'stuff' } )] ) platforms_for( page ).should include :jsp end end context 'when there is an X-Powered-By header with Servlet' do it 'identifies it as JSP' do page = Arachni::Page.from_data( url: 'http://stuff.com/blah', response: { headers: { 'X-Powered-By' => 'Servlet/2.4' } } ) platforms_for( page ).should include :jsp end end context 'when there is an X-Powered-By header with JSP' do it 'identifies it as JSP' do page = Arachni::Page.from_data( url: 'http://stuff.com/blah', response: { headers: { 'X-Powered-By' => 'JSP/2.1' } } ) platforms_for( page ).should include :jsp end end end
Version data entries
8 entries across 8 versions & 1 rubygems