dradis-mediawiki 3.7.0 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acde37cc28ad603fdf19cab768a918b3d91b753c
|
4
|
+
data.tar.gz: 72d15dc77c7d0077452246f47594ebe5c4fea5c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b809ddc91d96d3d2813fc63b7d2a9e22e33e9d6cf5c23dcf31e908c51de8029687469bd221cc79bd45e381704ab7d48176453d2f1015ddde4555938e643e505c
|
7
|
+
data.tar.gz: fc448a660a1f042ccd1ee413f39b0ef9ca2c8ea821af46b1a5f21b2190192ec3c64b5336cc24cde8e680b95ec732c9e9ec948688c637bbf291d1ced99e1167a7
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
## Dradis Framework 3.
|
1
|
+
## Dradis Framework 3.8 (September, 2017) ##
|
2
2
|
|
3
|
-
*
|
3
|
+
* Add https support
|
4
|
+
|
5
|
+
## Dradis Framework 3.7 (July, 2017) ##
|
4
6
|
|
7
|
+
* Fix Net::HTTP not being required
|
5
8
|
|
6
9
|
## Dradis Framework 3.6 (March, 2017) ##
|
7
10
|
|
data/lib/dradis-mediawiki.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
require '
|
1
|
+
require 'net/http'
|
2
|
+
require 'dradis/plugins/mediawiki'
|
@@ -1,5 +1,4 @@
|
|
1
1
|
module Dradis::Plugins::Mediawiki
|
2
|
-
|
3
2
|
class Engine < ::Rails::Engine
|
4
3
|
isolate_namespace Dradis::Plugins::Mediawiki
|
5
4
|
|
@@ -8,11 +7,11 @@ module Dradis::Plugins::Mediawiki
|
|
8
7
|
description 'Import entries from an external MediaWiki'
|
9
8
|
|
10
9
|
addon_settings :wikiimport do
|
10
|
+
settings.default_fields = 'Title,Impact,Probability,Description,Recommendation'
|
11
11
|
settings.default_host = 'localhost'
|
12
|
-
settings.default_port = 80
|
13
12
|
settings.default_path = 'mediawiki/api.php'
|
14
|
-
settings.
|
13
|
+
settings.default_port = 443
|
14
|
+
settings.default_scheme = 'http(s)'
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
18
17
|
end
|
@@ -3,9 +3,12 @@ module Dradis::Plugins::Mediawiki::Filters
|
|
3
3
|
def query(params={})
|
4
4
|
results = []
|
5
5
|
|
6
|
-
host
|
7
|
-
|
8
|
-
|
6
|
+
host = Dradis::Plugins::Mediawiki::Engine.settings.host
|
7
|
+
path = Dradis::Plugins::Mediawiki::Engine.settings.path
|
8
|
+
port = Dradis::Plugins::Mediawiki::Engine.settings.port
|
9
|
+
scheme = Dradis::Plugins::Mediawiki::Engine.settings.scheme
|
10
|
+
|
11
|
+
port = (scheme == 'https' ? 443 : 80) if port.blank?
|
9
12
|
|
10
13
|
begin
|
11
14
|
# Parameters required by MediaWiki API
|
@@ -21,7 +24,7 @@ module Dradis::Plugins::Mediawiki::Filters
|
|
21
24
|
}
|
22
25
|
|
23
26
|
# Get the results over HTTP
|
24
|
-
Net::HTTP.start(host, port) do |http|
|
27
|
+
Net::HTTP.start(host, port, use_ssl: scheme == 'https') do |http|
|
25
28
|
res = http.get("#{path}?#{filter_params.to_query}")
|
26
29
|
xml_doc = Nokogiri::XML( res.body )
|
27
30
|
results += xml_doc.xpath('api/query/pages/page').map do |xml_page|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-mediawiki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dradis-plugins
|