Update upstream source from tag 'upstream/0.0.41.4'
Update to upstream version '0.0.41.4'
with Debian dir ff423d65590447f33a85baf2092be6b935167021
Sophie Brun
5 years ago
0 | 0 |
# CMSScanner
|
1 | 1 |
|
2 | 2 |
[![Gem Version](https://badge.fury.io/rb/cms_scanner.svg)](https://badge.fury.io/rb/cms_scanner)
|
3 | |
[![Build Status](https://img.shields.io/travis/wpscanteam/CMSScanner.svg)](https://travis-ci.org/wpscanteam/CMSScanner)
|
|
3 |
[![Build Status](https://travis-ci.org/wpscanteam/CMSScanner.svg?branch=master)](https://travis-ci.org/wpscanteam/CMSScanner)
|
4 | 4 |
[![Coverage Status](https://img.shields.io/coveralls/wpscanteam/CMSScanner.svg)](https://coveralls.io/r/wpscanteam/CMSScanner)
|
5 | 5 |
[![Code Climate](https://api.codeclimate.com/v1/badges/b90b7f9f6982792ef8d6/maintainability)](https://codeclimate.com/github/wpscanteam/CMSScanner/maintainability)
|
6 | 6 |
|
45 | 45 |
potential_urls.uniq.each do |potential_url|
|
46 | 46 |
next unless target.in_scope?(potential_url)
|
47 | 47 |
|
48 | |
res = NS::Browser.get(potential_url)
|
|
48 |
res = NS::Browser.post(potential_url, body: Digest::MD5.hexdigest(rand(999_999).to_s[0..5]))
|
49 | 49 |
|
50 | |
next unless res&.body =~ /XML-RPC server accepts POST requests only/i
|
|
50 |
next unless res&.body =~ /<methodResponse>/i
|
51 | 51 |
|
52 | 52 |
return NS::XMLRPC.new(potential_url,
|
53 | 53 |
confidence: 100,
|
19 | 19 |
s.require_paths = ['lib']
|
20 | 20 |
|
21 | 21 |
s.add_dependency 'nokogiri', '~> 1.10.0'
|
22 | |
s.add_dependency 'opt_parse_validator', '~> 0.0.16.6'
|
|
22 |
s.add_dependency 'opt_parse_validator', '~> 0.0.17.0'
|
23 | 23 |
s.add_dependency 'public_suffix', '~> 3.0.0'
|
24 | 24 |
s.add_dependency 'ruby-progressbar', '~> 1.10.0'
|
25 | 25 |
s.add_dependency 'typhoeus', '~> 1.3.0'
|
|
31 | 31 |
s.add_development_dependency 'rake', '~> 12.3'
|
32 | 32 |
s.add_development_dependency 'rspec', '~> 3.8.0'
|
33 | 33 |
s.add_development_dependency 'rspec-its', '~> 1.2.0'
|
34 | |
s.add_development_dependency 'rubocop', '~> 0.62.0'
|
|
34 |
s.add_development_dependency 'rubocop', '~> 0.65.0'
|
35 | 35 |
s.add_development_dependency 'simplecov', '~> 0.16.1'
|
36 | 36 |
s.add_development_dependency 'webmock', '~> 3.5.1'
|
37 | 37 |
end
|
12 | 12 |
# Adds the potential option file paths to the option_parser
|
13 | 13 |
def register_options_files
|
14 | 14 |
[Dir.home, Dir.pwd].each do |dir|
|
15 | |
option_parser.options_files.supported_extensions.each do |ext|
|
|
15 |
option_parser.options_files.class.supported_extensions.each do |ext|
|
16 | 16 |
@option_parser.options_files << Pathname.new(dir).join(".#{NS.app_name}", "cli_options.#{ext}").to_s
|
17 | 17 |
end
|
18 | 18 |
end
|
2 | 2 |
module Platform
|
3 | 3 |
# Some PHP specific implementation
|
4 | 4 |
module PHP
|
5 | |
DEBUG_LOG_PATTERN = /\[[^\]]+\] PHP (?:Warning|Error|Notice):/.freeze
|
|
5 |
DEBUG_LOG_PATTERN = /(?:\[\d{2}\-[a-zA-Z]{3}\-\d{4}\s\d{2}\:\d{2}:\d{2}\s[A-Z]{3}\]|
|
|
6 |
PHP\s(?:Fatal|Warning|Strict|Error|Notice):)/x.freeze
|
6 | 7 |
FPD_PATTERN = /Fatal error:.+? in (.+?) on/.freeze
|
7 | 8 |
ERROR_LOG_PATTERN = /PHP Fatal error/i.freeze
|
8 | 9 |
|
0 | 0 |
# Version
|
1 | 1 |
module CMSScanner
|
2 | |
VERSION = '0.0.41.3'.freeze
|
|
2 |
VERSION = '0.0.41.4'.freeze
|
3 | 3 |
end
|
105 | 105 |
before { finder.potential_urls << 'htpp://ex.org' }
|
106 | 106 |
|
107 | 107 |
after do
|
108 | |
stub_request(:get, xml_rpc_url).to_return(body: body)
|
|
108 |
stub_request(:post, xml_rpc_url).to_return(body: body)
|
109 | 109 |
|
110 | 110 |
expect(finder.aggressive).to eql @expected
|
111 | 111 |
end
|
0 | |
XML-RPC server accepts POST requests only.
|
|
0 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
1 |
<methodResponse>
|
|
2 |
<fault>
|
|
3 |
<value>
|
|
4 |
<struct>
|
|
5 |
<member>
|
|
6 |
<name>faultCode</name>
|
|
7 |
<value><int>-32700</int></value>
|
|
8 |
</member>
|
|
9 |
<member>
|
|
10 |
<name>faultString</name>
|
|
11 |
<value><string>parse error. not well formed</string></value>
|
|
12 |
</member>
|
|
13 |
</struct>
|
|
14 |
</value>
|
|
15 |
</fault>
|
|
16 |
</methodResponse>
|
|
0 |
[12-Apr-2012 10:20:30 UTC] WordPress database error Table 'xxxx.xxxx' doesn't exist for query DELETE FROM xxx WHERE id NOT IN( SELECT entry_id FROM xxxx ) made by do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, XXX::cron, XXX::delete_orphaned_entries⏎
|
86 | 86 |
option_parser = controllers.option_parser
|
87 | 87 |
|
88 | 88 |
[Dir.home, Dir.pwd].each do |dir|
|
89 | |
option_parser.options_files.supported_extensions.each do |ext|
|
|
89 |
option_parser.options_files.class.supported_extensions.each do |ext|
|
90 | 90 |
expected << File.join(dir, '.cms_scanner', "cli_options.#{ext}")
|
91 | 91 |
end
|
92 | 92 |
end
|
4 | 4 |
let(:path) { 'd.log' }
|
5 | 5 |
|
6 | 6 |
context 'when the body matches' do
|
7 | |
%w[debug.log].each do |file|
|
|
7 |
%w[debug.log db_error.log].each do |file|
|
8 | 8 |
context "when #{file} body" do
|
9 | 9 |
let(:body) { File.read(fixtures.join('debug_log', file)) }
|
10 | 10 |
|