ruby-nmap 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +3 -0
- data/.gitignore +8 -0
- data/.yardopts +1 -1
- data/ChangeLog.md +5 -0
- data/LICENSE.txt +1 -3
- data/README.md +8 -7
- data/Rakefile +11 -7
- data/gemspec.yml +3 -3
- data/lib/nmap/version.rb +1 -1
- data/ruby-nmap.gemspec +103 -13
- metadata +93 -69
data/.document
ADDED
data/.gitignore
ADDED
data/.yardopts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--markup markdown --title 'Ruby Nmap Documentation' --protected
|
1
|
+
--markup markdown --title 'Ruby Nmap Documentation' --protected
|
data/ChangeLog.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# ruby-nmap
|
2
2
|
|
3
|
-
* [Source](
|
4
|
-
* [Issues](
|
5
|
-
* [Documentation](http://rubydoc.info/gems/ruby-nmap/
|
6
|
-
*
|
3
|
+
* [Source](https://github.com/sophsec/ruby-nmap/)
|
4
|
+
* [Issues](https://github.com/sophsec/ruby-nmap/issues)
|
5
|
+
* [Documentation](http://rubydoc.info/gems/ruby-nmap/frames)
|
6
|
+
* [Email](mailto:postmodern.mod3 at gmail.com)
|
7
7
|
|
8
8
|
## Description
|
9
9
|
|
@@ -75,13 +75,14 @@ Print NSE script output from an XML scan file:
|
|
75
75
|
|
76
76
|
* [nmap](http://www.insecure.org/) >= 5.00
|
77
77
|
* [nokogiri](http://nokogiri.rubyforge.org/) ~> 1.3
|
78
|
-
* [rprogram](
|
78
|
+
* [rprogram](https://github.com/postmodern/rprogram) ~> 0.3
|
79
79
|
|
80
80
|
## Install
|
81
81
|
|
82
|
-
$
|
82
|
+
$ gem install ruby-nmap
|
83
83
|
|
84
84
|
## License
|
85
85
|
|
86
|
-
|
86
|
+
Copyright (c) 2009-2012 Postmodern
|
87
87
|
|
88
|
+
See {file:LICENSE.txt} for license information.
|
data/Rakefile
CHANGED
@@ -1,14 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'rake'
|
3
5
|
|
4
6
|
begin
|
5
|
-
gem '
|
6
|
-
require '
|
7
|
+
gem 'rubygems-tasks', '~> 0.1'
|
8
|
+
require 'rubygems/tasks'
|
7
9
|
|
8
|
-
|
10
|
+
Gem::Tasks.new
|
9
11
|
rescue LoadError => e
|
10
|
-
|
11
|
-
|
12
|
+
warn e.message
|
13
|
+
warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'."
|
12
14
|
end
|
13
15
|
|
14
16
|
begin
|
@@ -21,11 +23,12 @@ rescue LoadError => e
|
|
21
23
|
abort "Please run `gem install rspec` to install RSpec."
|
22
24
|
end
|
23
25
|
end
|
26
|
+
|
27
|
+
task :test => :spec
|
24
28
|
task :default => :spec
|
25
|
-
task :test => :spec
|
26
29
|
|
27
30
|
begin
|
28
|
-
gem 'yard', '~> 0.
|
31
|
+
gem 'yard', '~> 0.7'
|
29
32
|
require 'yard'
|
30
33
|
|
31
34
|
YARD::Rake::YardocTask.new
|
@@ -34,3 +37,4 @@ rescue LoadError => e
|
|
34
37
|
abort "Please run `gem install yard` to install YARD."
|
35
38
|
end
|
36
39
|
end
|
40
|
+
task :doc => :yard
|
data/gemspec.yml
CHANGED
@@ -7,7 +7,7 @@ description:
|
|
7
7
|
license: MIT
|
8
8
|
authors: Postmodern
|
9
9
|
email: postmodern.mod3@gmail.com
|
10
|
-
homepage:
|
10
|
+
homepage: https://github.com/sophsec/ruby-nmap#readme
|
11
11
|
has_yard: true
|
12
12
|
|
13
13
|
requirements: nmap >= 5.00
|
@@ -17,6 +17,6 @@ dependencies:
|
|
17
17
|
rprogram: ~> 0.3
|
18
18
|
|
19
19
|
development_dependencies:
|
20
|
-
|
20
|
+
rubygems-tasks: ~> 0.1
|
21
21
|
rspec: ~> 2.4
|
22
|
-
yard: ~> 0.
|
22
|
+
yard: ~> 0.7
|
data/lib/nmap/version.rb
CHANGED
data/ruby-nmap.gemspec
CHANGED
@@ -1,15 +1,105 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gemspec|
|
6
|
+
root = File.dirname(__FILE__)
|
7
|
+
lib_dir = File.join(root,'lib')
|
8
|
+
files = `git ls-files`.split($/)
|
9
|
+
|
10
|
+
filter_files = lambda { |paths|
|
11
|
+
files & case paths
|
12
|
+
when Array
|
13
|
+
paths
|
14
|
+
when String
|
15
|
+
Dir[paths]
|
16
|
+
end
|
17
|
+
}
|
18
|
+
|
19
|
+
version = {
|
20
|
+
:file => 'nmap/version',
|
21
|
+
:constant => 'Nmap::VERSION'
|
22
|
+
}
|
23
|
+
|
24
|
+
defaults = {
|
25
|
+
'name' => File.basename(root),
|
26
|
+
'files' => files,
|
27
|
+
'require_paths' => ['ext', 'lib'].select { |dir| File.directory?(dir) },
|
28
|
+
'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
|
29
|
+
'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
|
30
|
+
'doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
|
31
|
+
'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}']
|
32
|
+
}
|
33
|
+
|
34
|
+
metadata = defaults.merge(YAML.load_file('gemspec.yml'))
|
35
|
+
|
36
|
+
gemspec.name = metadata['name']
|
37
|
+
gemspec.version = if metadata['version']
|
38
|
+
metadata['version']
|
39
|
+
else
|
40
|
+
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
41
|
+
|
42
|
+
require version[:file]
|
43
|
+
eval(version[:constant])
|
44
|
+
end
|
45
|
+
|
46
|
+
gemspec.summary = metadata.fetch('summary',metadata['description'])
|
47
|
+
gemspec.description = metadata.fetch('description',metadata['summary'])
|
48
|
+
|
49
|
+
gemspec.licenses = Array(metadata['license'])
|
50
|
+
gemspec.authors = Array(metadata['authors'])
|
51
|
+
|
52
|
+
gemspec.email = metadata['email']
|
53
|
+
gemspec.homepage = metadata['homepage']
|
54
|
+
|
55
|
+
gemspec.require_paths = Array(metadata['require_paths'])
|
56
|
+
gemspec.files = filter_files[metadata['files']]
|
57
|
+
gemspec.files += Array(metadata['generated_files'])
|
58
|
+
gemspec.executables = metadata['executables']
|
59
|
+
gemspec.extensions = metadata['extensions']
|
60
|
+
|
61
|
+
if Gem::VERSION < '1.7.'
|
62
|
+
gemspec.default_executable = gemspec.executables.first
|
63
|
+
end
|
64
|
+
|
65
|
+
gemspec.test_files = filter_files[metadata['test_files']]
|
66
|
+
gemspec.extra_rdoc_files = Array(metadata['extra_doc_files'])
|
67
|
+
|
68
|
+
gemspec.post_install_message = metadata['post_install_message']
|
69
|
+
gemspec.requirements = metadata['requirements']
|
70
|
+
|
71
|
+
if gemspec.respond_to?(:required_ruby_version=)
|
72
|
+
gemspec.required_ruby_version = metadata['required_ruby_version']
|
73
|
+
end
|
74
|
+
|
75
|
+
if gemspec.respond_to?(:required_rubygems_version=)
|
76
|
+
gemspec.required_rubygems_version = metadata['required_ruby_version']
|
77
|
+
end
|
78
|
+
|
79
|
+
parse_versions = lambda { |versions|
|
80
|
+
case versions
|
81
|
+
when Array
|
82
|
+
versions.map { |v| v.to_s }
|
83
|
+
when String
|
84
|
+
versions.split(/,\s*/)
|
85
|
+
end
|
86
|
+
}
|
87
|
+
|
88
|
+
if metadata['dependencies']
|
89
|
+
metadata['dependencies'].each do |name,versions|
|
90
|
+
gemspec.add_dependency(name,parse_versions[versions])
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
if metadata['runtime_dependencies']
|
95
|
+
metadata['runtime_dependencies'].each do |name,versions|
|
96
|
+
gemspec.add_runtime_dependency(name,parse_versions[versions])
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
if metadata['development_dependencies']
|
101
|
+
metadata['development_dependencies'].each do |name,versions|
|
102
|
+
gemspec.add_development_dependency(name,parse_versions[versions])
|
103
|
+
end
|
14
104
|
end
|
15
105
|
end
|
metadata
CHANGED
@@ -1,83 +1,108 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-nmap
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
4
5
|
prerelease:
|
5
|
-
version: 0.5.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Postmodern
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: nokogiri
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
18
|
+
requirements:
|
21
19
|
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: rprogram
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
25
|
none: false
|
31
|
-
requirements:
|
26
|
+
requirements:
|
32
27
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rprogram
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0.3'
|
35
38
|
type: :runtime
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: ore-tasks
|
39
39
|
prerelease: false
|
40
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rubygems-tasks
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
41
49
|
none: false
|
42
|
-
requirements:
|
50
|
+
requirements:
|
43
51
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.1'
|
46
54
|
type: :development
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rspec
|
50
55
|
prerelease: false
|
51
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
52
65
|
none: false
|
53
|
-
requirements:
|
66
|
+
requirements:
|
54
67
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.4'
|
57
70
|
type: :development
|
58
|
-
version_requirements: *id004
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: yard
|
61
71
|
prerelease: false
|
62
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '2.4'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: yard
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
63
81
|
none: false
|
64
|
-
requirements:
|
82
|
+
requirements:
|
65
83
|
- - ~>
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0.7'
|
68
86
|
type: :development
|
69
|
-
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0.7'
|
70
94
|
description: A Ruby interface to Nmap, the exploration tool and security / port scanner.
|
71
|
-
email:
|
72
|
-
- postmodern.mod3@gmail.com
|
95
|
+
email: postmodern.mod3@gmail.com
|
73
96
|
executables: []
|
74
|
-
|
75
97
|
extensions: []
|
76
|
-
|
77
|
-
|
98
|
+
extra_rdoc_files:
|
99
|
+
- ChangeLog.md
|
100
|
+
- LICENSE.txt
|
78
101
|
- README.md
|
79
|
-
files:
|
102
|
+
files:
|
103
|
+
- .document
|
80
104
|
- .gemtest
|
105
|
+
- .gitignore
|
81
106
|
- .rspec
|
82
107
|
- .yardopts
|
83
108
|
- ChangeLog.md
|
@@ -116,38 +141,37 @@ files:
|
|
116
141
|
- spec/spec_helper.rb
|
117
142
|
- spec/task_spec.rb
|
118
143
|
- spec/xml_spec.rb
|
119
|
-
homepage:
|
120
|
-
licenses:
|
144
|
+
homepage: https://github.com/sophsec/ruby-nmap#readme
|
145
|
+
licenses:
|
121
146
|
- MIT
|
122
147
|
post_install_message:
|
123
148
|
rdoc_options: []
|
124
|
-
|
125
|
-
require_paths:
|
149
|
+
require_paths:
|
126
150
|
- lib
|
127
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
152
|
none: false
|
129
|
-
requirements:
|
130
|
-
- -
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version:
|
133
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ! '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
158
|
none: false
|
135
|
-
requirements:
|
136
|
-
- -
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version:
|
139
|
-
requirements:
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
requirements:
|
140
164
|
- nmap >= 5.00
|
141
|
-
rubyforge_project:
|
142
|
-
rubygems_version: 1.
|
165
|
+
rubyforge_project:
|
166
|
+
rubygems_version: 1.8.24
|
143
167
|
signing_key:
|
144
168
|
specification_version: 3
|
145
169
|
summary: A Ruby interface to Nmap.
|
146
|
-
test_files:
|
170
|
+
test_files:
|
147
171
|
- spec/host_spec.rb
|
148
|
-
- spec/port_spec.rb
|
149
172
|
- spec/nmap_spec.rb
|
150
|
-
- spec/sequence_spec.rb
|
151
173
|
- spec/os_spec.rb
|
152
|
-
- spec/
|
174
|
+
- spec/port_spec.rb
|
175
|
+
- spec/sequence_spec.rb
|
153
176
|
- spec/task_spec.rb
|
177
|
+
- spec/xml_spec.rb
|