ruby-nmap 0.1.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.
data/spec/xml_spec.rb ADDED
@@ -0,0 +1,52 @@
1
+ require 'nmap/xml'
2
+
3
+ require 'spec_helper'
4
+ require 'helpers/xml'
5
+
6
+ describe XML do
7
+ include Helpers
8
+
9
+ before(:all) do
10
+ @xml = XML.new(Helpers::SCAN_FILE)
11
+ end
12
+
13
+ it "should have a version" do
14
+ @xml.version.should == '1.02'
15
+ end
16
+
17
+ it "should parse the scanner version" do
18
+ @xml.scanner.version == '4.68'
19
+ end
20
+
21
+ it "should parse the scanner name" do
22
+ @xml.scanner.name.should == 'nmap'
23
+ end
24
+
25
+ it "should parse the scanner arguments" do
26
+ @xml.scanner.arguments.should == 'nmap -v -oX samples/backspace.xml -O -P0 -sS 192.168.5.*'
27
+ end
28
+
29
+ it "should parse the scan information" do
30
+ scan_info = @xml.scan_info
31
+
32
+ scan_info.length.should == 1
33
+ scan_info.first.type.should == :syn
34
+ scan_info.first.protocol.should == :tcp
35
+ end
36
+
37
+ it "should parse the verbose level" do
38
+ @xml.verbose.should == 1
39
+ end
40
+
41
+ it "should parse the debugging level" do
42
+ @xml.debugging.should == 0
43
+ end
44
+
45
+ it "should parse the hosts" do
46
+ @xml.hosts.length.should == 10
47
+ end
48
+
49
+ it "should convert to a String" do
50
+ @xml.to_s.should == Helpers::SCAN_FILE
51
+ end
52
+ end
data/tasks/spec.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'spec/rake/spectask'
2
+
3
+ desc "Run all specifications"
4
+ Spec::Rake::SpecTask.new(:spec) do |t|
5
+ t.libs += ['lib', 'spec']
6
+ t.spec_opts = ['--colour', '--format', 'specdoc']
7
+ end
8
+
9
+ task :test => :spec
10
+ task :default => :spec
data/tasks/yard.rb ADDED
@@ -0,0 +1,18 @@
1
+ lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
2
+ unless $LOAD_PATH.include?(lib_dir)
3
+ $LOAD_PATH.unshift(lib_dir)
4
+ end
5
+
6
+ require 'yard'
7
+
8
+ YARD::Rake::YardocTask.new do |t|
9
+ t.files = ['lib/**/*.rb']
10
+ t.options = [
11
+ '--protected',
12
+ '--files', 'History.txt',
13
+ '--title', 'ruby-nmap',
14
+ '--quiet'
15
+ ]
16
+ end
17
+
18
+ task :docs => :yardoc
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,155 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-nmap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Postmodern
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDQDCCAiigAwIBAgIBADANBgkqhkiG9w0BAQUFADBGMRgwFgYDVQQDDA9wb3N0
14
+ bW9kZXJuLm1vZDMxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
15
+ ARkWA2NvbTAeFw0wOTA2MDMwNDU5MDNaFw0xMDA2MDMwNDU5MDNaMEYxGDAWBgNV
16
+ BAMMD3Bvc3Rtb2Rlcm4ubW9kMzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYK
17
+ CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
18
+ 1wvANkTDHFgVih5XLjuTwTZjgBq1lBGybXJiH6Id1lY2JOMqM5FB1DDHVvvij94i
19
+ mJabN0zkzu6VKWC70y0IwOxY7CPokr0eFdK/D0y7mCq1P8QITv76i2YqAl0eYqIt
20
+ W+IhIkANQ7E6uMZIZcdnfadC6lPAtlKkqtd9crvRbFgr6e3kyflmohbRnTEJHoRd
21
+ 7SHHsybE6DSn7oTDs6XBTNrNIn5VfZA0z01eeos/+zBm1zKJOK2+/7xtLLDuDU9G
22
+ +Rd+ltUBbvxUrMNZmDG29pnmN2xTRH+Q8HxD2AxlvM5SRpK6OeZaHV7PaCCAVZ4L
23
+ T9BFl1sfMvRlABeGEkSyuQIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE
24
+ sDAdBgNVHQ4EFgQUKwsd+PqEYmBvyaTyoL+uRuk+PhEwDQYJKoZIhvcNAQEFBQAD
25
+ ggEBAB4TvHsrlbcXcKg6gX5BIb9tI+zGkpzo0Z7jnxMEcNO7NGGwmzafDBI/xZYv
26
+ xkRH3/HXbGGYDOi6Q6gWt5GujSx0bOImDtYTJTH8jnzN92HzEK5WdScm1QpZKF1e
27
+ cezArMbxbSPaosxTCtG6LQTkE28lFQsmFZ5xzouugS4h5+LVJiVMmiP+l3EfkjFa
28
+ GOURU+rNEMPWo8MCWivGW7jes6BMzWHcW7DQ0scNVmIcCIgdyMmpscuAEOSeghy9
29
+ /fFs57Ey2OXBL55nDOyvN/ZQ2Vab05UH4t+GCxjAPeirzL/29FBtePT6VD44c38j
30
+ pDj+ws7QjtH/Qcrr1l9jfN0ehDs=
31
+ -----END CERTIFICATE-----
32
+
33
+ date: 2009-11-13 00:00:00 -08:00
34
+ default_executable:
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: nokogiri
38
+ type: :runtime
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.4.0
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: rprogram
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.1.7
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ type: :development
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.1.12
65
+ version:
66
+ - !ruby/object:Gem::Dependency
67
+ name: yard
68
+ type: :development
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.2.3.5
75
+ version:
76
+ - !ruby/object:Gem::Dependency
77
+ name: hoe
78
+ type: :development
79
+ version_requirement:
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 2.3.3
85
+ version:
86
+ description: A Ruby interface to Nmap, the exploration tool and security / port scanner.
87
+ email:
88
+ - postmodern.mod3@gmail.com
89
+ executables: []
90
+
91
+ extensions: []
92
+
93
+ extra_rdoc_files:
94
+ - History.txt
95
+ - Manifest.txt
96
+ - README.txt
97
+ files:
98
+ - History.txt
99
+ - Manifest.txt
100
+ - README.txt
101
+ - Rakefile
102
+ - lib/nmap.rb
103
+ - lib/nmap/task.rb
104
+ - lib/nmap/program.rb
105
+ - lib/nmap/address.rb
106
+ - lib/nmap/host.rb
107
+ - lib/nmap/os_class.rb
108
+ - lib/nmap/os_match.rb
109
+ - lib/nmap/os.rb
110
+ - lib/nmap/port.rb
111
+ - lib/nmap/scanner.rb
112
+ - lib/nmap/scan.rb
113
+ - lib/nmap/status.rb
114
+ - lib/nmap/xml.rb
115
+ - lib/nmap/version.rb
116
+ - tasks/spec.rb
117
+ - tasks/yard.rb
118
+ - spec/spec_helper.rb
119
+ - spec/helpers/scan.xml
120
+ - spec/helpers/xml.rb
121
+ - spec/os_spec.rb
122
+ - spec/host_spec.rb
123
+ - spec/xml_spec.rb
124
+ - spec/nmap_spec.rb
125
+ has_rdoc: yard
126
+ homepage: http://github.com/sophsec/ruby-nmap
127
+ licenses: []
128
+
129
+ post_install_message:
130
+ rdoc_options:
131
+ - --main
132
+ - README.txt
133
+ require_paths:
134
+ - lib
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: "0"
140
+ version:
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "0"
146
+ version:
147
+ requirements: []
148
+
149
+ rubyforge_project: ruby-nmap
150
+ rubygems_version: 1.3.5
151
+ signing_key:
152
+ specification_version: 3
153
+ summary: A Ruby interface to Nmap, the exploration tool and security / port scanner.
154
+ test_files: []
155
+
metadata.gz.sig ADDED
Binary file