ruby-nmap 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -1,3 +1,27 @@
1
+ ### 0.4.0 / 2010-11-17
2
+
3
+ * Added new options to {Nmap::Task} based on nmap 5.21:
4
+ * `-PY` - `nmap.sctp_init_ping`
5
+ * `-PR` - `nmap.arp_ping`
6
+ * `-sY` - `nmap.sctp_init_scan`
7
+ * `-sZ` - `nmap.sctp_cookie_echo_scan`
8
+ * `--allports` - `nmap.all_ports`
9
+ * `-sR` - `nmap.rpc_scan`
10
+ * `-T` - `nmap.timing_template`
11
+ * `-T0` - `nmap.paranoid_timing`
12
+ * `-T1` - `nmap.sneaky_timing`
13
+ * `-T2` - `nmap.polite_timing`
14
+ * `-T3` - `nmap.normal_timing`
15
+ * `-T4` - `nmap.aggressive_timing`
16
+ * `-T5` - `nmap.insane_timing`
17
+ * `--randomize-hosts` - `nmap.randomize_hosts`
18
+ * `--adler32` - `nmap.sctp_adler32`
19
+ * `-oA` - `nmap.output_all`
20
+ * `-d` - `nmap.debug`
21
+ * `--stats-every` - `nmap.stats_every`
22
+ * `--release-memory` - `nmap.release_memory`
23
+ * Specify that ruby-nmap requires `nmap` >= 5.00.
24
+
1
25
  ### 0.3.0 / 2010-11-08
2
26
 
3
27
  * Added {Nmap::Host#scripts}.
data/README.md CHANGED
@@ -47,7 +47,7 @@ Parse Nmap XML scan files:
47
47
  end
48
48
  end
49
49
 
50
- Print out NSE script output from an XML scan file:
50
+ Print NSE script output from an XML scan file:
51
51
 
52
52
  require 'nmap/xml'
53
53
 
@@ -73,7 +73,7 @@ Print out NSE script output from an XML scan file:
73
73
 
74
74
  ## Requirements
75
75
 
76
- * [nmap](http://www.insecure.org/)
76
+ * [nmap](http://www.insecure.org/) >= 5.00
77
77
  * [nokogiri](http://nokogiri.rubyforge.org/) >= 1.3.0
78
78
  * [rprogram](http://github.com/postmodern/rprogram) ~> 0.2.0
79
79
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
 
4
4
  begin
5
- gem 'ore-tasks', '~> 0.2.0'
5
+ gem 'ore-tasks', '~> 0.3.0'
6
6
  require 'ore/tasks'
7
7
 
8
8
  Ore::Tasks.new
data/gemspec.yml CHANGED
@@ -10,13 +10,13 @@ email: postmodern.mod3@gmail.com
10
10
  homepage: http://github.com/sophsec/ruby-nmap
11
11
  has_yard: true
12
12
 
13
- requirements: nmap, 4.xx or greater
13
+ requirements: nmap >= 5.00
14
14
 
15
15
  dependencies:
16
16
  nokogiri: >= 1.3.0
17
17
  rprogram: ~> 0.2.0
18
18
 
19
19
  development_dependencies:
20
- ore-tasks: ~> 0.2.0
20
+ ore-tasks: ~> 0.3.0
21
21
  rspec: ~> 2.0.0
22
22
  yard: ~> 0.6.0
data/lib/nmap/task.rb CHANGED
@@ -19,32 +19,35 @@ module Nmap
19
19
  # * `-PS` - `nmap.syn_discovery`
20
20
  # * `-PA` - `nmap.ack_discovery`
21
21
  # * `-PU` - `nmap.udp_discovery`
22
+ # * '-PY' - `nmap.sctp_init_ping`
22
23
  # * `-PE` - `nmap.icmp_echo_discovery`
23
24
  # * `-PP` - `nmap.icmp_timestamp_discovery`
24
25
  # * `-PM` - `nmap.icmp_netmask_discovery`
25
26
  # * `-PO` - `nmap.ip_ping`
27
+ # * `-PR` - `nmap.arp_ping`
28
+ # * `--traceroute` - `nmap.traceroute`
26
29
  # * `-n` - `nmap.disable_dns`
27
30
  # * `-R` - `nmap.enable_dns`
28
- # * `--dns-servers` - `nmap.dns_servers`
29
31
  # * `--systems-dns` - `nmap.systems_dns`
32
+ # * `--dns-servers` - `nmap.dns_servers`
30
33
  #
31
- # ### Scan Techniques:
34
+ # ### Port Scanning Techniques:
32
35
  #
33
36
  # * `-sS` - `nmap.syn_scan`
34
37
  # * `-sT` - `nmap.connect_scan`
35
- # * `-sA` - `nmap.ack_scan`
36
- # * `-sW` - `nmap.window_scan`
37
- # * `-sM` - `nmap.maimon_scan`
38
38
  # * `-sU` - `nmap.udp_scan`
39
+ # * `-sY` - `nmap.sctp_init_scan`
39
40
  # * `-sN` - `nmap.null_scan`
40
41
  # * `-sF` - `nmap.fin_scan`
41
42
  # * `-sX` - `nmap.xmas_scan`
43
+ # * `-sA` - `nmap.ack_scan`
44
+ # * `-sW` - `nmap.window_scan`
45
+ # * `-sM` - `nmap.maimon_scan`
42
46
  # * `--scanflags` - `nmap.tcp_scan_flags`
47
+ # * `-sZ` - `nmap.sctp_cookie_echo_scan`
43
48
  # * `-sI` - `nmap.idle_scan`
44
49
  # * `-s0` - `nmap.ip_scan`
45
50
  # * `-b` - `nmap.ftp_bounce_scan`
46
- # * `--traceroute` - `nmap.traceroute`
47
- # * `--reason` - `nmap.show_reason`
48
51
  #
49
52
  # ### Port Specification and Scan Order:
50
53
  #
@@ -57,10 +60,12 @@ module Nmap
57
60
  # ### Service/Version Detection:
58
61
  #
59
62
  # * `-sV` - `nmap.service_scan`
63
+ # * `--allports` - `nmap.all_ports`
60
64
  # * `--version-intensity` - `nmap.version_intensity`
61
65
  # * `--version-light` - `nmap.version_light`
62
66
  # * `--version-all` - `nmap.version_all`
63
67
  # * `--version-trace` - `nmap.version_trace`
68
+ # * `-sR` - `nmap.rpc_scan`
64
69
  #
65
70
  # ### Script Scan:
66
71
  #
@@ -73,8 +78,8 @@ module Nmap
73
78
  # ### OS Detection:
74
79
  #
75
80
  # * `-O` - `nmap.os_fingerprint`
76
- # * `--osscan_limit` - `nmap.limit_os_scan`
77
- # * `--osscan_guess` - `nmap.max_os_scan`
81
+ # * `--osscan-limit` - `nmap.limit_os_scan`
82
+ # * `--osscan-guess` - `nmap.max_os_scan`
78
83
  #
79
84
  # ### Timing and Performance:
80
85
  #
@@ -90,6 +95,14 @@ module Nmap
90
95
  # * `--max-scan-delay` - `nmap.max_scan_delay`
91
96
  # * `--min-rate` - `nmap.min_rate`
92
97
  # * `--max-rate` - `nmap.max_rate`
98
+ # * `--default-rst-ratelimit` - `nmap.default_rst_ratelimit`
99
+ # * `-T` - `nmap.timing_template`
100
+ # * `-T0` - `nmap.paranoid_timing`
101
+ # * `-T1` - `nmap.sneaky_timing`
102
+ # * `-T2` - `nmap.polite_timing`
103
+ # * `-T3` - `nmap.normal_timing`
104
+ # * `-T4` - `nmap.aggressive_timing`
105
+ # * `-T5` - `nmap.insane_timing`
93
106
  #
94
107
  # ### Firewall/IDS Evasion and Spoofing:
95
108
  #
@@ -102,8 +115,10 @@ module Nmap
102
115
  # * `--data-length` - `nmap.data_length`
103
116
  # * `--ip-options` - `nmap.ip_options`
104
117
  # * `--ttl` - `nmap.ttl`
118
+ # * `--randomize-hosts` - `nmap.randomize_hosts`
105
119
  # * `--spoof-mac` - `nmap.spoof_mac`
106
120
  # * `--badsum` - `nmap.bad_checksum`
121
+ # * `--adler32` - `nmap.sctp_adler32`
107
122
  #
108
123
  # ### Output:
109
124
  #
@@ -111,11 +126,21 @@ module Nmap
111
126
  # * `-oX` - `nmap.xml`
112
127
  # * `-oS` - `nmap.skiddie`
113
128
  # * `-oG` - `nmap.grepable`
129
+ # * `-oA` - `nmap.output_all`
130
+ #
131
+ # ### Verbosity and Debugging:
132
+ #
114
133
  # * `-v` - `nmap.verbose`
115
- # * `--open` - `nmap.show_open_ports`
134
+ # * `-d` - `nmap.debug`
135
+ # * `--reason` - `nmap.show_reason`
136
+ # * `--stats-every` - `nmap.stats_every`
116
137
  # * `--packet-trace` - `nmap.show_packets`
138
+ # * `--open` - `nmap.show_open_ports`
117
139
  # * `--iflist` - `nmap.show_interfaces`
118
140
  # * `--log-errors` - `nmap.show_log_errors`
141
+ #
142
+ # ### Miscellaneous Output:
143
+ #
119
144
  # * `--append-output` - `nmap.append`
120
145
  # * `--resume` - `nmap.resume`
121
146
  # * `--stylesheet` - `nmap.stylesheet`
@@ -127,10 +152,14 @@ module Nmap
127
152
  # * `-6` - `nmap.ipv6`
128
153
  # * `-A` - `nmap.all`
129
154
  # * `--datadir` - `nmap.nmap_datadir`
155
+ # * `--servicedb` - `nmap.servicedb`
156
+ # * `--versiondb` - `nmap.versiondb`
130
157
  # * `--send-eth` - `nmap.raw_ethernet`
131
158
  # * `--send-ip` - `nmap.raw_ip`
132
159
  # * `--privledged` - `nmap.privledged`
133
160
  # * `--unprivledged` - `nmap.unprivledged`
161
+ # * `--release-memory` - `nmap.release_memory`
162
+ # * `--interactive` - `nmap.interactive`
134
163
  # * `-V` - `nmap.version`
135
164
  # * `-h` - `nmap.help`
136
165
  #
@@ -153,31 +182,34 @@ module Nmap
153
182
  short_option :flag => '-PS', :name => :syn_discovery
154
183
  short_option :flag => '-PA', :name => :ack_discovery
155
184
  short_option :flag => '-PU', :name => :udp_discovery
185
+ short_option :flag => '-PY', :name => :sctp_init_ping
156
186
  short_option :flag => '-PE', :name => :icmp_echo_discovery
157
187
  short_option :flag => '-PP', :name => :icmp_timestamp_discovery
158
188
  short_option :flag => '-PM', :name => :icmp_netmask_discovery
159
189
  short_option :flag => '-PO', :name => :ip_ping
190
+ short_option :flag => '-PR', :name => :arp_ping
191
+ long_option :flag => '--traceroute', :name => :traceroute
160
192
  short_option :flag => '-n', :name => :disable_dns
161
193
  short_option :flag => '-R', :name => :enable_dns
162
194
  long_option :flag => '--dns-servers', :separator => ','
163
195
  long_option :flag => '--system-dns'
164
196
 
165
- # SCAN TECHNIQUES:
197
+ # PORT SCANNING TECHNIQUES:
166
198
  short_option :flag => '-sS', :name => :syn_scan
167
199
  short_option :flag => '-sT', :name => :connect_scan
168
- short_option :flag => '-sA', :name => :ack_scan
169
- short_option :flag => '-sW', :name => :window_scan
170
- short_option :flag => '-sM', :name => :maimon_scan
171
200
  short_option :flag => '-sU', :name => :udp_scan
201
+ short_option :flag => '-sY', :name => :sctp_init_scan
172
202
  short_option :flag => '-sN', :name => :null_scan
173
203
  short_option :flag => '-sF', :name => :fin_scan
174
204
  short_option :flag => '-sX', :name => :xmas_scan
205
+ short_option :flag => '-sA', :name => :ack_scan
206
+ short_option :flag => '-sW', :name => :window_scan
207
+ short_option :flag => '-sM', :name => :maimon_scan
175
208
  long_option :flag => '--scanflags', :name => :tcp_scan_flags
209
+ short_option :flag => '-sZ', :name => :sctp_cookie_echo_scan
176
210
  short_option :flag => '-sI', :name => :idle_scan
177
211
  short_option :flag => '-s0', :name => :ip_scan
178
212
  short_option :flag => '-b', :name => :ftp_bounce_scan
179
- long_option :flag => '--traceroute', :name => :traceroute
180
- long_option :flag => '--reason', :name => :show_reason
181
213
 
182
214
  # PORT SPECIFICATION AND SCAN ORDER:
183
215
  short_option :flag => '-p', :name => :ports do |opt,value|
@@ -200,10 +232,12 @@ module Nmap
200
232
 
201
233
  # SERVICE/VERSION DETECTION:
202
234
  short_option :flag => '-sV', :name => :service_scan
235
+ long_option :flag => '--allports', :name => :all_ports
203
236
  long_option :flag => '--version-intensity'
204
237
  long_option :flag => '--version-light'
205
238
  long_option :flag => '--version-all'
206
239
  long_option :flag => '--version-trace'
240
+ short_option :flag => '-sR', :name => :rpc_scan
207
241
 
208
242
  # SCRIPT SCAN:
209
243
  short_option :flag => '-sC', :name => :default_script
@@ -216,8 +250,9 @@ module Nmap
216
250
 
217
251
  # OS DETECTION:
218
252
  short_option :flag => '-O', :name => :os_fingerprint
219
- long_option :flag => '--osscan_limit', :name => :limit_os_scan
220
- long_option :flag => '--osscan_guess', :name => :max_os_scan
253
+ long_option :flag => '--osscan-limit', :name => :limit_os_scan
254
+ long_option :flag => '--osscan-guess', :name => :max_os_scan
255
+ long_option :flag => '--max-os-tries', :name => :max_os_tries
221
256
 
222
257
  # TIMING AND PERFORMANCE:
223
258
  long_option :flag => '--min-hostgroup', :name => :min_host_group
@@ -232,6 +267,14 @@ module Nmap
232
267
  long_option :flag => '--max-scan-delay'
233
268
  long_option :flag => '--min-rate'
234
269
  long_option :flag => '--max-rate'
270
+ long_option :flag => '--default-rst-ratelimit'
271
+ short_option :flag => '-T', :name => :timing_template
272
+ short_option :flag => '-T0', :name => :paranoid_timing
273
+ short_option :flag => '-T1', :name => :sneaky_timing
274
+ short_option :flag => '-T2', :name => :polite_timing
275
+ short_option :flag => '-T3', :name => :normal_timing
276
+ short_option :flag => '-T4', :name => :aggressive_timing
277
+ short_option :flag => '-T5', :name => :insane_timing
235
278
 
236
279
  # FIREWALL/IDS EVASION AND SPOOFING:
237
280
  short_option :flag => '-f', :name => :packet_fragments
@@ -243,19 +286,29 @@ module Nmap
243
286
  long_option :flag => '--data-length'
244
287
  long_option :flag => '--ip-options'
245
288
  long_option :flag => '--ttl'
289
+ long_option :flag => '--randomize-hosts'
246
290
  long_option :flag => '--spoof-mac'
247
291
  long_option :flag => '--badsum', :name => :bad_checksum
292
+ long_option :flag => '--adler32', :name => :sctp_adler32
248
293
 
249
294
  # OUTPUT:
250
295
  short_option :flag => '-oN', :name => :save
251
296
  short_option :flag => '-oX', :name => :xml
252
297
  short_option :flag => '-oS', :name => :skiddie
253
298
  short_option :flag => '-oG', :name => :grepable
299
+ short_option :flag => '-oA', :name => :output_all
300
+
301
+ # Verbosity and Debugging:
254
302
  short_option :flag => '-v', :name => :verbose
255
- long_option :flag => '--open', :name => :show_open_ports
303
+ short_option :flag => '-d', :name => :debug
304
+ long_option :flag => '--reason', :name => :show_reason
305
+ long_option :flag => '--stats-every'
256
306
  long_option :flag => '--packet-trace', :name => :show_packets
307
+ long_option :flag => '--open', :name => :show_open_ports
257
308
  long_option :flag => '--iflist', :name => :show_interfaces
258
309
  long_option :flag => '--log-errors', :name => :show_log_errors
310
+
311
+ # Miscellaneous output:
259
312
  long_option :flag => '--append-output', :name => :append
260
313
  long_option :flag => '--resume'
261
314
  long_option :flag => '--stylesheet'
@@ -266,10 +319,14 @@ module Nmap
266
319
  short_option :flag => '-6', :name => :ipv6
267
320
  short_option :flag => '-A', :name => :all
268
321
  long_option :flag => '--datadir', :name => :nmap_datadir
322
+ long_option :flag => '--servicedb'
323
+ long_option :flag => '--versiondb'
269
324
  long_option :flag => '--send-eth', :name => :raw_ethernet
270
325
  long_option :flag => '--send-ip', :name => :raw_ip
271
326
  long_option :flag => '--privledged'
272
327
  long_option :flag => '--unprivleged'
328
+ long_option :flag => '--release-memory'
329
+ long_option :flag => '--interactive'
273
330
  short_option :flag => '-V', :name => :version
274
331
  short_option :flag => '-h', :name => :help
275
332
 
data/lib/nmap/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Nmap
2
2
  # ruby-nmap version
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
7
+ - 4
8
8
  - 0
9
- version: 0.3.0
9
+ version: 0.4.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Postmodern
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-08 00:00:00 -08:00
17
+ date: 2010-11-17 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -57,9 +57,9 @@ dependencies:
57
57
  - !ruby/object:Gem::Version
58
58
  segments:
59
59
  - 0
60
- - 2
60
+ - 3
61
61
  - 0
62
- version: 0.2.0
62
+ version: 0.3.0
63
63
  type: :development
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - 0
161
161
  version: "0"
162
162
  requirements:
163
- - nmap, 4.xx or greater
163
+ - nmap >= 5.00
164
164
  rubyforge_project: ruby-nmap
165
165
  rubygems_version: 1.3.7
166
166
  signing_key: