dradis-nmap 3.12.0 → 3.17.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
- SHA1:
3
- metadata.gz: 878cee3cce8af3f03460de821fce3cf4223d7a3c
4
- data.tar.gz: 7cac57433eb24cdd32665d1261132eb6b61651bb
2
+ SHA256:
3
+ metadata.gz: 996eb518d872fbf970088967f347bba0add8ca7963f92e545868f3fb27e0c6d4
4
+ data.tar.gz: cb3780eaf7828f25f1a3a68575f6dfe0bf19f92982b826dbafe0735fd7d4d716
5
5
  SHA512:
6
- metadata.gz: d15d383fd0aa9808c8e36496a24113415e4a0464ba9950cb4f1e26be679c356008a7e42767485d92e9ca604c6056843c83bc36bf3d058d282880ac13a3f8fbf8
7
- data.tar.gz: 134af0300d00ece7acac850f636ad164d10eea5e5a6c5adc3e3da8f770a4595b2e3d6afea6f4aad396912d6211fa6c1b13661339be417c43b140bb9c0bb81952
6
+ metadata.gz: f7e8855e9cd9db4141aa4428a21506553b77cda637c7b7967928e26815d1415a30c1eccc0c6c9f7fc9c675a4cf9d9d1f6863ca808ceb8b6a50534af75b6a16e7
7
+ data.tar.gz: 1542f8590c01c392ecbf35e6c2c32e8fa5f1f310f4da0d9a92bc4dea016947d783f5d604017f2ba6f14d839eb532be7451aae5a1463542854a5461a082843d19
@@ -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.17 (May, 2020) ##
2
+
3
+ * No changes.
4
+
5
+ ## Dradis Framework 3.16 (February, 2020) ##
6
+
7
+ * No changes.
8
+
9
+ ## Dradis Framework 3.15 (November, 2019) ##
10
+
11
+ * No changes.
12
+
13
+ ## Dradis Framework 3.14 (August, 2019) ##
14
+
15
+ * Add port.service.tunnel field to the port template
16
+
17
+ ## Dradis Framework 3.13 (June, 2019) ##
18
+
19
+ * No changes.
20
+
1
21
  ## Dradis Framework 3.12 (March, 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 = 12
11
+ MINOR = 17
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.12.0
4
+ version: 3.17.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-04-01 00:00:00.000000000 Z
11
+ date: 2020-06-02 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.0.1
154
155
  signing_key:
155
156
  specification_version: 4
156
157
  summary: Nmap add-on for the Dradis Framework.