wpscan 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cd042a221b0b46139937c959bd6428d4bedd1a2
4
- data.tar.gz: dd5575dbaf1929427b82e8fa85496941eb3da313
3
+ metadata.gz: 5faff8eba24f5f7d0ea97833dfb2200f23c1414b
4
+ data.tar.gz: 905e1d1dec28cea9d51d094ed7af626233f131fa
5
5
  SHA512:
6
- metadata.gz: ebe332bbc3f165474bfef341caf390d9ade882270ebaf68a901a4a8379decdc482cba640461aa8ff545b9ee05f9d2b84c6cec29a6f11129b2a50363eaf416f95
7
- data.tar.gz: 225ef4a7706c4a44bd70a5c5da2b420a8d0f73d1bae8b52f613d1eb054fb469a86c60860189324a1e1f2505e129038b2bb521315485dd366830a86d8536556bd
6
+ metadata.gz: 10b9dc665fb06f2d3f422a02f432a64921bb855662627abf548aca9b9f45ee3cb6aa9f6e97edc71ba58f759f7eedebce90628849aa79f259e0ea1f1effba9049
7
+ data.tar.gz: ae7fc0b48cd53132fd2c0d2e4212b05a798afbbbb7aac9737d0cddb79b164885431b49b786b02eca0ae228926e71c60f5b6dd7f4699e4e607a71832202ef6db7
data/README.md CHANGED
@@ -114,6 +114,7 @@ Pull the repo with ```docker pull wpscanteam/wpscan-v3```
114
114
  # Usage
115
115
 
116
116
  ```wpscan --url blog.tld``` This will scan the blog using default options with a good compromise between speed and accuracy. For example, the plugins will be checked passively but their version with a mixed detection mode (passively + aggressively). Potential config backup files will also be checked, along with other interesting findings. If a more stealthy approach is required, then ```wpscan --stealthy --url blog.tld``` can be used.
117
+ As a result, when using the ```--enumerate``` option, don't forget to set the ```--plugins-detection``` accordingly, as its default is 'passive'.
117
118
 
118
119
  For more options, open a terminal and type ```wpscan --help``` (if you built wpscan from the source, you should type the command outside of the git repo)
119
120
 
@@ -4,14 +4,16 @@ module WPScan
4
4
  class Core < CMSScanner::Controller::Core
5
5
  # @return [ Array<OptParseValidator::Opt> ]
6
6
  def cli_options
7
- [OptURL.new(['--url URL', 'The URL of the blog to scan'], required_unless: :update, default_protocol: 'http')] +
7
+ [OptURL.new(['--url URL', 'The URL of the blog to scan'],
8
+ required_unless: %i[update help version], default_protocol: 'http')] +
8
9
  super.drop(1) + # delete the --url from CMSScanner
9
10
  [
10
11
  OptChoice.new(['--server SERVER', 'Force the supplied server module to be loaded'],
11
12
  choices: %w[apache iis nginx],
12
13
  normalize: %i[downcase to_sym]),
13
14
  OptBoolean.new(['--force', 'Do not check if the target is running WordPress']),
14
- OptBoolean.new(['--[no-]update', 'Wether or not to update the Database'], required_unless: :url)
15
+ OptBoolean.new(['--[no-]update', 'Wether or not to update the Database'],
16
+ required_unless: %i[url help version])
15
17
  ]
16
18
  end
17
19
 
@@ -46,7 +48,9 @@ module WPScan
46
48
  end
47
49
 
48
50
  def before_scan
49
- output('banner') unless parsed_options[:banner] == false
51
+ @last_update = local_db.last_update
52
+
53
+ maybe_output_banner_help_and_version # From CMS Scanner
50
54
 
51
55
  update_db if update_db_required?
52
56
  setup_cache
@@ -25,8 +25,9 @@ module WPScan
25
25
 
26
26
  # @param [ WPScan::Target ] target
27
27
  def initialize(target)
28
- (WPScan::DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
29
- %w[RSSGenerator AtomGenerator RDFGenerator Readme UniqueFingerprinting]
28
+ (%w[RSSGenerator AtomGenerator RDFGenerator] +
29
+ WPScan::DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
30
+ %w[Readme UniqueFingerprinting]
30
31
  ).each do |finder_name|
31
32
  finders << WpVersion.const_get(finder_name.to_sym).new(target)
32
33
  end
@@ -0,0 +1,5 @@
1
+ Current Version: <%= WPScan::VERSION %>
2
+ <% if @last_update -%>
3
+ Last DB Update: <%= @last_update.strftime('%Y-%m-%d') %>
4
+ <% end -%>
5
+
@@ -0,0 +1,2 @@
1
+ "version": <%= WPScan::VERSION.to_json %>,
2
+ "last_db_update": <%= @last_update.to_json %>,
@@ -22,13 +22,13 @@ module WPScan
22
22
  begin
23
23
  parsed = parser.respond_to?(:safe_load) ? parser.safe_load(body) : parser.load(body)
24
24
 
25
- return parsed if parsed.is_a?(Hash)
25
+ return parsed if parsed.is_a?(Hash) || parsed.is_a?(Array)
26
26
  rescue StandardError
27
27
  next
28
28
  end
29
29
  end
30
30
 
31
- nil # Make sure nil is returned in case none of the parsers manage to parse the body correctly
31
+ nil # Make sure nil is returned in case none of the parsers managed to parse the body correctly
32
32
  end
33
33
 
34
34
  # No Passive way
@@ -39,8 +39,10 @@ module WPScan
39
39
  # @return [ Version ]
40
40
  def find(response, _opts = {})
41
41
  parsed_body = parse(response.body)
42
+ # Create indexes for the #dig, digits are converted to integers
43
+ indexes = self.class::KEY.split(':').map { |e| e == e.to_i.to_s ? e.to_i : e }
42
44
 
43
- return unless (data = parsed_body&.dig(*self.class::KEY.split(':'))) && data =~ self.class::PATTERN
45
+ return unless (data = parsed_body&.dig(*indexes)) && data =~ self.class::PATTERN
44
46
 
45
47
  create_version(
46
48
  Regexp.last_match[:v],
@@ -1,4 +1,4 @@
1
1
  # Version
2
2
  module WPScan
3
- VERSION = '3.2.0'.freeze
3
+ VERSION = '3.2.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wpscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - WPScanTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2018-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cms_scanner
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.39.0
19
+ version: 0.0.39.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.39.0
26
+ version: 0.0.39.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.1'
41
- - !ruby/object:Gem::Dependency
42
- name: opt_parse_validator
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.0.15.2
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.0.15.2
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: yajl-ruby
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +156,14 @@ dependencies:
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: 3.2.0
159
+ version: 3.3.0
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: 3.2.0
166
+ version: 3.3.0
181
167
  description: WPScan is a black box WordPress vulnerability scanner.
182
168
  email:
183
169
  - team@wpscan.org
@@ -275,6 +261,7 @@ files:
275
261
  - app/views/cli/core/db_update_finished.erb
276
262
  - app/views/cli/core/db_update_started.erb
277
263
  - app/views/cli/core/not_fully_configured.erb
264
+ - app/views/cli/core/version.erb
278
265
  - app/views/cli/enumeration/config_backups.erb
279
266
  - app/views/cli/enumeration/medias.erb
280
267
  - app/views/cli/enumeration/plugins.erb
@@ -295,6 +282,7 @@ files:
295
282
  - app/views/json/core/db_update_finished.erb
296
283
  - app/views/json/core/db_update_started.erb
297
284
  - app/views/json/core/not_fully_configured.erb
285
+ - app/views/json/core/version.erb
298
286
  - app/views/json/enumeration/config_backups.erb
299
287
  - app/views/json/enumeration/medias.erb
300
288
  - app/views/json/enumeration/plugins.erb