This commit is contained in:
erwanlr
2019-05-01 19:50:43 +01:00
parent 507bac8542
commit ff98a7b23b
3 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>WordPress 4.0 | Just another WordPress site</title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="http://wp-lab:82/aa/xmlrpc.php">
<meta name='robots' content='noindex,follow' />
<link rel="alternate" type="application/rss+xml" title="Wordpress 4.0 &raquo; Feed" href="http://wp-lab:82/aa/feed/" />
<link rel="alternate" type="application/rss+xml" title="Wordpress 4.0 &raquo; Comments Feed" href="http://wp-lab:82/aa/comments/feed/" />
<link rel='stylesheet' id='twentyfourteen-lato-css' href='//fonts.googleapis.com/css?family=Lato%3A300%2C400%2C700%2C900%2C300italic%2C400italic%2C700italic' type='text/css' media='all' />
<link rel='stylesheet' id='flexSlider_stylesheet-css' href='http://wp-lab:82/aa/wp-content/plugins/reflex-gallery/scripts/flexslider/flexslider.css?ver=4.0' type='text/css' media='all' />
<link rel='stylesheet' id='prettyPhoto_stylesheet-css' href='http://wp-lab:82/aa/wp-content/plugins/reflex-gallery/scripts/prettyPhoto/prettyPhoto.css?ver=4.0' type='text/css' media='all' />
<link rel='stylesheet' id='genericons-css' href='http://wp-lab:82/aa/wp-content/themes/twentyfourteen/genericons/genericons.css?ver=3.0.3' type='text/css'>
<a class="skip-link screen-reader-text" href="#content">Skip to content</a>

View File

@@ -31,6 +31,16 @@ shared_examples 'WordPress::CustomDirectories' do
end
end
context 'when the target URL is invalid according to PublicSuffix and contains a port' do
let(:url) { 'http://wp-lab:82/aa' }
it 'returns wp-content when matches' do
stub_request(:get, target.url).to_return(body: File.read(fixtures.join('with_port.html')))
expect(target.content_dir).to eql 'wp-content'
end
end
context 'when not found via the homepage' do
before { stub_request(:get, target.url).to_return(body: '') }

View File

@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.executables = ['wpscan']
s.require_paths = ['lib']
s.add_dependency 'cms_scanner', '~> 0.5.0'
s.add_dependency 'cms_scanner', '~> 0.5.1'
s.add_development_dependency 'bundler', '>= 1.6'
s.add_development_dependency 'coveralls', '~> 0.8.0'