arp_scan 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad523800941924d8ef1121a6d5757b55be171ca5
4
- data.tar.gz: 47c2452c4d7a149cdb31d4103cae7e23344ce0c7
3
+ metadata.gz: a350836a9cf6579fa714992273f38bce584c7457
4
+ data.tar.gz: d118e275d8c1c3e3b3e0f10588752cf96fe90ab8
5
5
  SHA512:
6
- metadata.gz: 2a840f2abb674944204976a51db4221b317efb1508860b060b795688d311e37a1120c564f5863d4b272de3ba7c91239205c63cb5b18a55fe25d73bfc2e7033a1
7
- data.tar.gz: 5d1f0c22e868592708ba5f1425d1ec9b84975c9c2c3735525375e7c91a6d88e5718ff0977a230baca2064458e2a10a75e3e8c6e5b3c23be02e9f4b6ec5c8d450
6
+ metadata.gz: 029d7744afbcb0a3c6bc5474bcf0f868696d33d489f44a01a1e2b4927510959acfb7c8f7ecfca5eef31c216b05422db1d397b622bd0f94b3cd2dac3a499562b5
7
+ data.tar.gz: 144b8459b0c4b3b9c5997895a6790b281b1f1be5737ee9371aa2366ee764385b191fedce487b84e23c1f53198f5ed90ebf237eaeccbf55baed091918c9749787
data/README.md CHANGED
@@ -31,10 +31,16 @@ This code is untested and will hopefully be refactored soon.
31
31
 
32
32
  Add this line to your application's Gemfile:
33
33
 
34
+ From GitHub:
34
35
  ```ruby
35
36
  gem 'arp_scan', :git => 'git://github.com/mikerodrigues/arp_scan.git'
36
37
  ```
37
38
 
39
+ From RubyGems:
40
+ ```ruby
41
+ gem 'arp_scan'
42
+ ```
43
+
38
44
  And then execute:
39
45
 
40
46
  $ bundle
@@ -52,26 +58,29 @@ metainfo about the scan itself.
52
58
 
53
59
  Scanning is easy:
54
60
 
55
- require 'arp_scan'
61
+ ```ruby
62
+ require 'arp_scan'
56
63
 
57
- report = ARPScan('--localnet')
64
+ report = ARPScan('--localnet')
58
65
 
59
- report.datalink => "EN10MB (Ethernet)",
60
- report.interface => "eth0"
61
- report.range_size => "256"
62
- report.reply_count => "2"
63
- report.scan_rate => "169.99" # hosts/sec
64
- report.scan_time => "1.586" # seconds
65
- report.version => "1.8.1" # arp-scan version
66
+ report.datalink => "EN10MB (Ethernet)"
67
+ report.interface => "eth0"
68
+ report.range_size => 256
69
+ report.reply_count => 2
70
+ report.scan_rate => 169.99 # hosts/sec
71
+ report.scan_time => 1.586 # seconds
72
+ report.version => "1.8.1" # arp-scan version
73
+ ```
66
74
 
67
75
  Each `ScanReport` also holds zero or more `Host` objects representing founds
68
76
  hosts:
69
77
 
70
- first_host = report.hosts.first
71
- first_host.ip_addr => '10.0.0.1'
72
- first_host.mac => '00:11:22:33:44:55'
73
- first_host.oui => "NIC Manufacturer"
74
-
78
+ ```ruby
79
+ first_host = report.hosts.first
80
+ first_host.ip_addr => '10.0.0.1'
81
+ first_host.mac => '00:11:22:33:44:55'
82
+ first_host.oui => "NIC Manufacturer"
83
+ ```
75
84
 
76
85
 
77
86
 
@@ -10,7 +10,7 @@ module ARPScan
10
10
 
11
11
  def self.process(string)
12
12
  report = {}
13
- report[:hosts] = string.scan(Host_Entry_Regex)
13
+ report[:hosts] = string.scan(Host_Entry_Regex).map {|entry| Host.new(*entry)}
14
14
  report[:interface],
15
15
  report[:datalink] = string.scan(Interface_Summary_Regex)[0]
16
16
  report[:version],
@@ -18,7 +18,6 @@ module ARPScan
18
18
  report[:scan_time],
19
19
  report[:scan_rate],
20
20
  report[:reply_count] = string.scan(Received_Summary_Regex)[0]
21
- hosts = report[:hosts].map {|entry| Host.new(*entry)}
22
21
  ScanReport.new(report)
23
22
  end
24
23
  end
@@ -1,3 +1,3 @@
1
1
  module ARPScan
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arp_scan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Rodrigues