dradis-nmap 4.11.0 → 4.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -2
- data/dradis-nmap.gemspec +1 -1
- data/lib/dradis/plugins/nmap/gem_version.rb +1 -1
- data/lib/dradis/plugins/nmap/importer.rb +2 -2
- data/lib/dradis/plugins/nmap/mapping.rb +41 -0
- data/lib/dradis/plugins/nmap.rb +1 -0
- metadata +8 -11
- data/templates/host.fields +0 -4
- data/templates/host.template +0 -19
- data/templates/port.fields +0 -9
- data/templates/port.template +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28df4c2422ea7df986f42170119335f6cbead4763abd4bac31f097374b4f5645
|
4
|
+
data.tar.gz: bd1a3ee824695672a44ed48629693f307f4cd1cde23490da9bc0f125732b7355
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7871f65a0734bd1e2f4e58c8480f97b8eb47fca33c735a5957df997b5ae57bf48a9e1ca29a0e6f66b9e98da049b246e47cf3a28fc12aa3f4076ac45be59a67b4
|
7
|
+
data.tar.gz: 1174ed549a8b8a33e41c2cfc1705f0c5da972782f69b7872d32802f50d12c678a11fcea41d33a8d04a9b622d252e0fcaddbfed21bdef87f0d013f91045da9251
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,8 +4,7 @@
|
|
4
4
|
|
5
5
|
Upload Nmap files into Dradis.
|
6
6
|
|
7
|
-
The add-on requires [Dradis CE](https://
|
8
|
-
|
7
|
+
The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
|
9
8
|
|
10
9
|
## More information
|
11
10
|
|
data/dradis-nmap.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency 'dradis-plugins', '~> 4.0'
|
27
27
|
spec.add_dependency 'ruby-nmap', '~> 0.7'
|
28
28
|
|
29
|
-
spec.add_development_dependency 'bundler'
|
29
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
30
|
spec.add_development_dependency 'rake', '~> 10.0'
|
31
31
|
spec.add_development_dependency 'rspec-rails'
|
32
32
|
spec.add_development_dependency 'combustion', '~> 0.5.2'
|
@@ -41,7 +41,7 @@ module Dradis::Plugins::Nmap
|
|
41
41
|
host_node.set_property(:os, host.os.matches.map(&:name)) if host.os.present?
|
42
42
|
|
43
43
|
# Old-style properties-in-a-note approach
|
44
|
-
host_text =
|
44
|
+
host_text = mapping_service.apply_mapping(source: 'host', data: host)
|
45
45
|
content_service.create_note(text: host_text, node: host_node)
|
46
46
|
|
47
47
|
host.each_port do |port|
|
@@ -71,7 +71,7 @@ module Dradis::Plugins::Nmap
|
|
71
71
|
port.host = host.ip
|
72
72
|
|
73
73
|
# Add a note with the port information
|
74
|
-
port_text =
|
74
|
+
port_text = mapping_service.apply_mapping(source: 'port', data: port)
|
75
75
|
content_service.create_note(
|
76
76
|
text: port_text,
|
77
77
|
node: host_node)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Dradis::Plugins::Nmap
|
2
|
+
module Mapping
|
3
|
+
DEFAULT_MAPPING = {
|
4
|
+
host: {
|
5
|
+
'Title' => 'Nmap info: {{ nmap[host.ip] }}',
|
6
|
+
'IP' => '{{ nmap[host.ip] }}',
|
7
|
+
'Hostnames' => '{{ nmap[host.hostnames] }}',
|
8
|
+
'OS' => '{{ nmap[host.os] }}',
|
9
|
+
'Services' => "|_. Port number |_. Protocol |_. State |_. Service |_. Product |_. Version |\n{{ nmap[host.service_table] }}",
|
10
|
+
'Type' => 'Properties'
|
11
|
+
},
|
12
|
+
port: {
|
13
|
+
'Title' => '{{ nmap[port.number] }}/{{ nmap[port.protocol] }} is {{ nmap[port.state] }} ({{ nmap[port.reason] }})',
|
14
|
+
'Service' => '{{ nmap[port.service.name] }}',
|
15
|
+
'Product' => '{{ nmap[port.service.product] }}',
|
16
|
+
'Version' => '{{ nmap[port.service.version] }}',
|
17
|
+
'Host' => '{{ nmap[port.host] }}'
|
18
|
+
}
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
SOURCE_FIELDS = {
|
22
|
+
host: [
|
23
|
+
'host.hostnames',
|
24
|
+
'host.ip',
|
25
|
+
'host.service_table',
|
26
|
+
'host.os'
|
27
|
+
],
|
28
|
+
port: [
|
29
|
+
'port.number',
|
30
|
+
'port.protocol',
|
31
|
+
'port.state',
|
32
|
+
'port.reason',
|
33
|
+
'port.service.name',
|
34
|
+
'port.service.product',
|
35
|
+
'port.service.tunnel',
|
36
|
+
'port.service.version',
|
37
|
+
'port.host'
|
38
|
+
]
|
39
|
+
}.freeze
|
40
|
+
end
|
41
|
+
end
|
data/lib/dradis/plugins/nmap.rb
CHANGED
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: 4.
|
4
|
+
version: 4.13.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: 2024-
|
11
|
+
date: 2024-08-07 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: '0'
|
47
|
+
version: '2.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: '0'
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- lib/dradis/plugins/nmap/field_processor.rb
|
120
120
|
- lib/dradis/plugins/nmap/gem_version.rb
|
121
121
|
- lib/dradis/plugins/nmap/importer.rb
|
122
|
+
- lib/dradis/plugins/nmap/mapping.rb
|
122
123
|
- lib/dradis/plugins/nmap/version.rb
|
123
124
|
- lib/tasks/thorfile.rb
|
124
125
|
- spec/fixtures/files/invalid.xml
|
@@ -126,12 +127,8 @@ files:
|
|
126
127
|
- spec/fixtures/files/sample.xml
|
127
128
|
- spec/nmap_upload_spec.rb
|
128
129
|
- spec/spec_helper.rb
|
129
|
-
- templates/host.fields
|
130
130
|
- templates/host.sample
|
131
|
-
- templates/host.template
|
132
|
-
- templates/port.fields
|
133
131
|
- templates/port.sample
|
134
|
-
- templates/port.template
|
135
132
|
homepage: https://dradis.com/integrations/nmap.html
|
136
133
|
licenses:
|
137
134
|
- GPL-2
|
@@ -151,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
148
|
- !ruby/object:Gem::Version
|
152
149
|
version: '0'
|
153
150
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.5.6
|
155
152
|
signing_key:
|
156
153
|
specification_version: 4
|
157
154
|
summary: Nmap add-on for the Dradis Framework.
|
data/templates/host.fields
DELETED
data/templates/host.template
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#[Title]#
|
2
|
-
Nmap info: %host.ip%
|
3
|
-
|
4
|
-
#[IP]#
|
5
|
-
%host.ip%
|
6
|
-
|
7
|
-
#[Hostnames]#
|
8
|
-
%host.hostnames%
|
9
|
-
|
10
|
-
#[OS]#
|
11
|
-
%host.os%
|
12
|
-
|
13
|
-
#[Services]#
|
14
|
-
|_. Port number |_. Protocol |_. State |_. Service |_. Product |_. Version |
|
15
|
-
%host.service_table%
|
16
|
-
|
17
|
-
|
18
|
-
#[Type]#
|
19
|
-
Properties
|
data/templates/port.fields
DELETED
data/templates/port.template
DELETED