louis 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Louis
2
+
3
+ There is a public registry maintained by the IANA that is required to be used
4
+ by all vendors operating in certains spaces. Ethernet, Bluetooth, and Wireless
5
+ device manufacturers are all assigned unique prefixes. This database is
6
+ available publicly online and can be used to identify the manufacturer of these
7
+ devices. This library provides an easy mechanism to perform these lookups.
8
+
9
+ It is important to note that the way the lookup occur in this gem right now is
10
+ on the slower side, especially the first time a lookup is done as it doesn't
11
+ load it's database until then. This will improve over time as I already have
12
+ ideas on how to make the performance better.
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem 'louis'
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install louis
29
+
30
+ ## Usage
31
+
32
+ ```ruby
33
+ Louis.lookup('84:3a:4b:49:bc:f0')
34
+ => {"short_vendor"=>"IntelCor", "long_vendor"=>"Intel Corporate"}
35
+ ```
36
+
37
+ When the Vendor information isn't known it will instead return:
38
+
39
+ ```ruby
40
+ => {"long_vendor"=>"Unknown", "short_vendor"=>"Unknown"}
41
+ ```
42
+
43
+ ## OUI Database
44
+
45
+ The textual database in this gem is from the [Wireshark][1] project,
46
+ specifically sourced [from their source][2]. The file itself is licensed under
47
+ GPLv2 on it's own and subsequent use needs to conform to it's licensing terms.
48
+
49
+ ## Contributing
50
+
51
+ 1. Fork it ( https://github.com/pwnieexpress/louis/fork )
52
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
53
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
54
+ 4. Push to the branch (`git push origin my-new-feature`)
55
+ 5. Create a new Pull Request
56
+
57
+ [1]: https://wireshark.org/
58
+ [2]: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :environment do
4
+ base_path = File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
5
+ $LOAD_PATH.unshift(base_path) unless $LOAD_PATH.include?(base_path)
6
+
7
+ require 'louis'
8
+ end
9
+
10
+ desc "Start a pry session with the code loaded"
11
+ task :console => [:environment] do
12
+ require 'pry'
13
+ pry
14
+ end