dradis-nmap 3.13.0 → 3.18.0

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
- SHA1:
3
- metadata.gz: f34b975a92cc1846c69ebbdfef6a7556c4ae4433
4
- data.tar.gz: 04b6b0ee97c658baab549e066fbd486f84c18dfd
2
+ SHA256:
3
+ metadata.gz: 45c948807e28ec6a5221d4b96f6c6cea89704150634378abbb1d00d02143fc5b
4
+ data.tar.gz: 6b947c4c39a41c4be5c8b1e27f864fc1fa721f5f2b3e838994f9eff26edfd85c
5
5
  SHA512:
6
- metadata.gz: df31ca4a7068eb1533b64d6d9a38732bed1b3d31bac3c3948f85dc829158c8e8f7b9d088e2dfc2d95397ff92063da1de119f9230f5333e28162ac2234e5b8b20
7
- data.tar.gz: 4fcc6f0c0815d784c7e264641ccf22fe63a5d0e0145d6a47d530ec458671ad4c38b56528c3937a95161f6216b524d306a7b866a244f78b61eec3c2d16b305c18
6
+ metadata.gz: 3289979220eb1a17b726e715c515922d0eee2a520e5fc11d887da5a357f4f9cf98e061125dafaa845ba3eb7cbf29f208e2a4efca2e794e83efdc69c6a784d51e
7
+ data.tar.gz: b83f554912f1bc5601ac92ab973f3ded5c683ad12c256ebaf143527035f431e0f259eca3428a13ade1c4ee639774d2ee8747fea6040f801b8b52a68c64f38035
@@ -0,0 +1,16 @@
1
+ ### Steps to reproduce
2
+
3
+ Help us help you, how can we reproduce the problem?
4
+
5
+ ### Expected behavior
6
+ Tell us what should happen
7
+
8
+ ### Actual behavior
9
+ Tell us what happens instead
10
+
11
+ ### System configuration
12
+ **Dradis version**:
13
+
14
+ **Ruby version**:
15
+
16
+ **OS version**:
@@ -0,0 +1,36 @@
1
+ ### Summary
2
+
3
+ Provide a general description of the code changes in your pull
4
+ request... were there any bugs you had fixed? If so, mention them. If
5
+ these bugs have open GitHub issues, be sure to tag them here as well,
6
+ to keep the conversation linked together.
7
+
8
+
9
+ ### Other Information
10
+
11
+ If there's anything else that's important and relevant to your pull
12
+ request, mention that information here. This could include
13
+ benchmarks, or other information.
14
+
15
+ Thanks for contributing to Dradis!
16
+
17
+
18
+ ### Copyright assignment
19
+
20
+ Collaboration is difficult with commercial closed source but we want
21
+ to keep as much of the OSS ethos as possible available to users
22
+ who want to fix it themselves.
23
+
24
+ In order to unambiguously own and sell Dradis Framework commercial
25
+ products, we must have the copyright associated with the entire
26
+ codebase. Any code you create which is merged must be owned by us.
27
+ That's not us trying to be a jerks, that's just the way it works.
28
+
29
+ Please review the [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/master/CONTRIBUTING.md)
30
+ file for the details.
31
+
32
+ You can delete this section, but the following sentence needs to
33
+ remain in the PR's description:
34
+
35
+ > I assign all rights, including copyright, to any future Dradis
36
+ > work by myself to Security Roots.
@@ -1,3 +1,23 @@
1
+ ## Dradis Framework 3.18 (July, 2020) ##
2
+
3
+ * No changes.
4
+
5
+ ## Dradis Framework 3.17 (May, 2020) ##
6
+
7
+ * No changes.
8
+
9
+ ## Dradis Framework 3.16 (February, 2020) ##
10
+
11
+ * No changes.
12
+
13
+ ## Dradis Framework 3.15 (November, 2019) ##
14
+
15
+ * No changes.
16
+
17
+ ## Dradis Framework 3.14 (August, 2019) ##
18
+
19
+ * Add port.service.tunnel field to the port template
20
+
1
21
  ## Dradis Framework 3.13 (June, 2019) ##
2
22
 
3
23
  * No changes.
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency 'dradis-plugins', '~> 3.6'
28
28
  spec.add_dependency 'ruby-nmap', '~> 0.7'
29
29
 
30
- spec.add_development_dependency 'bundler', '~> 1.6'
30
+ spec.add_development_dependency 'bundler'
31
31
  spec.add_development_dependency 'rake', '~> 10.0'
32
32
  spec.add_development_dependency 'rspec-rails'
33
33
  spec.add_development_dependency 'combustion', '~> 0.5.2'
@@ -41,7 +41,11 @@ module Dradis
41
41
  # port.service.product
42
42
  # port.service.version
43
43
  if @nmap_object.service
44
- @nmap_object.service.try(attribute) || 'n/a'
44
+ if attribute == 'tunnel'
45
+ @nmap_object.service.try(:ssl?) ? 'ssl' : 'n/a'
46
+ else
47
+ @nmap_object.service.try(attribute) || 'n/a'
48
+ end
45
49
  end
46
50
  else
47
51
  @nmap_object.try(name) || 'n/a'
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 3
11
- MINOR = 13
11
+ MINOR = 18
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -50,6 +50,7 @@ module Dradis::Plugins::Nmap
50
50
  reason: port.reason,
51
51
  name: port.try(:service).try(:name),
52
52
  product: port.try(:service).try(:product),
53
+ tunnel: port.try(:service).try(:ssl?) ? 'ssl' : 'n/a',
53
54
  version: port.try(:service).try(:version),
54
55
  source: :nmap,
55
56
  }
@@ -12,34 +12,11 @@ describe 'Nmap upload plugin' do
12
12
  # Init services
13
13
  plugin = Dradis::Plugins::Nmap
14
14
 
15
- @content_service = Dradis::Plugins::ContentService.new(plugin: plugin)
16
- template_service = Dradis::Plugins::TemplateService.new(plugin: plugin)
15
+ @content_service = Dradis::Plugins::ContentService::Base.new(plugin: plugin)
17
16
 
18
17
  @importer = plugin::Importer.new(
19
- content_service: @content_service,
20
- template_service: template_service
18
+ content_service: @content_service
21
19
  )
22
-
23
- # Stub dradis-plugins methods
24
- #
25
- # They return their argument hashes as objects mimicking
26
- # Nodes, Issues, etc
27
- allow(@content_service).to receive(:create_node) do |args|
28
- # puts "create_node: #{ args.inspect }"
29
- OpenStruct.new(args)
30
- end
31
- allow(@content_service).to receive(:create_note) do |args|
32
- # puts "create_note: #{ args.inspect }"
33
- OpenStruct.new(args)
34
- end
35
- allow(@content_service).to receive(:create_issue) do |args|
36
- # puts "create_issue: #{ args.inspect }"
37
- OpenStruct.new(args)
38
- end
39
- allow(@content_service).to receive(:create_evidence) do |args|
40
- # puts "create_evidence: #{ args.inspect }"
41
- OpenStruct.new(args)
42
- end
43
20
  end
44
21
 
45
22
  it "creates an error note when the xml is not valid" do
@@ -47,16 +24,20 @@ describe 'Nmap upload plugin' do
47
24
  expect(args[:text]).to include("#[Title]#\nInvalid file format")
48
25
  OpenStruct.new(args)
49
26
  end.once
27
+
50
28
  # Run the import
51
29
  @importer.import(file: 'spec/fixtures/files/invalid.xml')
52
30
  end
53
31
 
54
32
  it "creates nodes, issues, notes and an evidences as needed" do
55
33
  expect(@content_service).to receive(:create_node) do |args|
56
- # puts "create_node: #{ args.inspect }"
34
+ puts "create_node: #{ args.inspect }"
57
35
  expect(args[:label]).to eq('74.207.244.221')
58
36
  expect(args[:type]).to eq(:host)
59
- OpenStruct.new(args)
37
+ obj = OpenStruct.new(args)
38
+ obj.define_singleton_method(:set_property) { |*| }
39
+ obj.define_singleton_method(:set_service) { |*| }
40
+ obj
60
41
  end.once
61
42
  expect(@content_service).to receive(:create_note) do |args|
62
43
  puts "create_note: #{ args.inspect }"
@@ -4,5 +4,6 @@ port.state
4
4
  port.reason
5
5
  port.service.name
6
6
  port.service.product
7
+ port.service.tunnel
7
8
  port.service.version
8
9
  port.host
@@ -10,5 +10,6 @@
10
10
  <service
11
11
  name="smtp"
12
12
  method="table"
13
- conf="3"/>
14
- </port>
13
+ conf="3"
14
+ tunnel="ssl"/>
15
+ </port>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-nmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.0
4
+ version: 3.18.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: 2019-06-10 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.6'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -102,6 +102,8 @@ executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".github/issue_template.md"
106
+ - ".github/pull_request_template.md"
105
107
  - ".gitignore"
106
108
  - ".rspec"
107
109
  - CHANGELOG.md
@@ -149,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
151
  - !ruby/object:Gem::Version
150
152
  version: '0'
151
153
  requirements: []
152
- rubyforge_project:
153
- rubygems_version: 2.6.12
154
+ rubygems_version: 3.1.2
154
155
  signing_key:
155
156
  specification_version: 4
156
157
  summary: Nmap add-on for the Dradis Framework.