arp_scan 0.0.5 → 0.0.6

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: b7b960cabf68bf289134ad75739ab76573745ed6
4
- data.tar.gz: 9b5cce94f3350b24e70053d6e0e4aa8045436403
3
+ metadata.gz: a0da554d94d3c4a4ad2f5e0f8f8d8715a3d2f577
4
+ data.tar.gz: 8fe6d25d5d0db6f24dc38a5b0da2221d15ccaabb
5
5
  SHA512:
6
- metadata.gz: 42b6b7058c6dd4d2f5fbae4c0a3a3c0dca2f1fbf09bf52151f9c3a11191d0b43a06bbe927794611637a424155cae7924f671b501d51d8e536e7627633d976289
7
- data.tar.gz: b9a8177864994bb4eef7993f638e1a6772f54ff5e4febe0211e691fb6a366c3b2700719a8a6f277f7a86717987dfd7624bff738e217f9e1f271e7a6ad478f496
6
+ metadata.gz: c511bd3dd089abe3b23146222906d592694b1fede141ef48d211eeaee431a6c3a362846dadd0733d91b60ed978197b78c5984c8679ca2f0dedbffbf9833a0882
7
+ data.tar.gz: 91db2dd695ac6c36580ec84f19bbbd22c19821559b45580aa4b2a19df2fc510abb053699688932d6d85779f9c77d30c2ea8c3da7fdd6b539a0db00da36a9f4df
data/lib/arp_scan/host.rb CHANGED
@@ -2,7 +2,18 @@ module ARPScan
2
2
  # Abstracts replying hosts from the arp-scan output.
3
3
  #
4
4
  class Host
5
- attr_reader :ip_addr, :mac, :oui
5
+
6
+ # The IP address of the host.
7
+ #
8
+ attr_reader :ip_addr
9
+
10
+ # The MAC address of the host.
11
+ #
12
+ attr_reader :mac
13
+
14
+ # OUI information about the host.
15
+ #
16
+ attr_reader :oui
6
17
 
7
18
  # Create a new hsot. IP address, MAC address and OUI information are
8
19
  # expected.
@@ -5,7 +5,36 @@ module ARPScan
5
5
  #
6
6
  class ScanReport
7
7
 
8
- attr_reader :hosts, :interface, :datalink, :version, :range_size, :scan_time, :scan_rate, :reply_count
8
+ # Array of Host objects.
9
+ #
10
+ attr_reader :hosts
11
+
12
+ # Name of the interface used for the scan.
13
+ #
14
+ attr_reader :interface
15
+
16
+ # Information about the interface type.
17
+ #
18
+ attr_reader :datalink
19
+
20
+ # `arp-scan` version number.
21
+ #
22
+ attr_reader :version
23
+
24
+ # Size of the scan range ( # of hosts scanned ).
25
+ #
26
+ attr_reader :range_size
27
+
28
+ # Duration of the scan in seconds, returns a Float.
29
+ #
30
+ attr_reader :scan_time
31
+
32
+ # The rate of the scan in hosts per second, returns a Float.
33
+ #
34
+ attr_reader :scan_rate
35
+
36
+ # The number of hosts that replied to the scan, returns a Fixnum
37
+ attr_reader :reply_count
9
38
 
10
39
  # Create a new scan report, passing in every attribute. The best way to do
11
40
  # this is with the ScanResultProcessor module.
@@ -7,10 +7,17 @@ module ARPScan
7
7
  #
8
8
  module ScanResultProcessor
9
9
 
10
- # Regexes for parsing the arp-scan output.
10
+ # Regex to capture IP address, MAC address, and OUI information
11
11
  #
12
12
  Host_Entry_Regex = /(\d+.\d+.\d+.\d+)\s(\w\w:\w\w:\w\w:\w\w:\w\w:\w\w)\s(.*)/
13
+
14
+ # Regex to capture interface and datalink
15
+ #
13
16
  Interface_Summary_Regex = /Interface: (?<interface>.+), datalink type: (?<datalink>.*$)/
17
+
18
+ # Regex to capture arp-scan version, scan range size, scan time, scan rate,
19
+ # and the number of responding hosts.
20
+ #
14
21
  Scan_Summary_Regex = /Ending arp-scan (?<version>.*): (?<range_size>.*) hosts scanned in (?<scan_time>.*) seconds \((?<scan_rate>.*) hosts\/sec\). (?<reply_count>.*) responded/
15
22
 
16
23
  # This method does the actual processing of the arp-scan result string. It
@@ -1,3 +1,3 @@
1
1
  module ARPScan
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arp_scan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Rodrigues
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
11
+ date: 2014-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler