项目作者: marirs

项目描述 :
Lookup for MAC OUI vendor details from the oui database
高级语言: Rust
项目地址: git://github.com/marirs/mac-oui.git
创建时间: 2021-02-12T05:32:46Z
项目社区:https://github.com/marirs/mac-oui

开源协议:MIT License

下载


MAC Address lookup tool

Linux Arm7
Linux x86_64
macOS
Windows
Crates.io
Documentation

Lookup the MAC Address for a corresponding details (eg: org, created, etc…)

Requirements

  • Rust 1.70+ (edition 2021)

Compile

  • Dev
    1. cargo b
  • Release
    1. cargo b --release

Usage

You can include this in your Cargo.toml file:

  1. [dependencies]
  2. mac_oui = "0.4.11"

If you want to use it with the inbuilt oui db; then:

  1. [dependencies]
  2. mac_oui = { version = "0.4.11", features = ["with-db"] }

and then

  1. use mac_oui::Oui;
  2. fn main () {
  3. let oui_db = Oui::default();
  4. assert!(oui_db.is_ok());
  5. }

Running the Example

You can run the default example that is included in the following manner.

  • cargo run --example mac_lookup <mac address> eg:
    1. cargo run --features="with-db" --example mac_lookup '70:B3:D5:e7:4f:81'
    2. Finished dev [optimized + debuginfo] target(s) in 1.54s
    3. Running `target/debug/examples/mac_lookup '70:B3:D5:e7:4f:81'`
    4. Entry {
    5. oui: "70:B3:D5",
    6. is_private: false,
    7. company_name: "Ieee Registration Authority",
    8. company_address: "445 Hoes Lane Piscataway NJ 08554 US",
    9. country_code: "US",
    10. assignment_block_size: "MA-L",
    11. date_created: "2014-01-12",
    12. date_updated: "2016-04-27",
    13. }
  • Example of lookup by Manufacturer

    1. $ cargo run --features="with-db" --example manufacturer_lookup "Apple, Inc"
    2. Finished dev [optimized + debuginfo] target(s) in 0.02s
    3. Running `target/debug/examples/manufacturer_lookup 'Apple, Inc'`
    4. [
    5. Entry {
    6. oui: "...",
    7. is_private: false,
    8. company_name: "Apple, Inc",
    9. company_address: "1 Infinite Loop Cupertino CA 95014 US",
    10. country_code: "US",
    11. assignment_block_size: "MA-L",
    12. date_created: "2017-02-21",
    13. date_updated: "2017-02-21",
    14. },
    15. <clip>....
    16. ]
  • Example Getting a list of Manufacturers
    ``bash $ cargo run --features="with-db" --example db_stats Finished dev [optimized + debuginfo] target(s) in 0.06s Runningtarget/debug/examples/db_stats`
    Total Records= 51615
    Total Manufacturers= 30840
    Total MAC Addrs= 51615

====Manufacturers====
[
“\”Azimut\” Production Association Jsc”,
“\”Continent\” Co Ltd”,
“\”Meta-chrom\” Co Ltd”,
“\”Rpc \”Energoautomatika\” Ltd”,
“(UN)Manned”,
“+plugg srl”,
“01db-Metravib”,
“1.A Connect GmbH”,
“1000eyes GmbH”,
“100fio networks Tech Llc”,
“10net Communications/Dca”,
“11811347 Canada Inc”,
“11wave Technonlogy Co, Ltd”,
“12Sided Tech, Llc”,
“1394 Printer Working Group”,
“1394 Trade Association”,
“16063”,
“1Net Corp”,
“1Verge Internet Tech (Beijing) Co, Ltd”,
“1more”,
]

[
“杭州德澜科技有限公司(HangZhou Delan Tech Co, Ltd)”,
“\u{200b}Asung Techno Co, Ltd”,
“éolane”,
“Östling Marking Systems GmbH”,
“Öresundskraft AB”,
“Åmic AB”,
“µTech Tecnologia Ltda”,
“«Intellect module» Llc”,
“zxsolution”,
“zte Corp”,
“zhejiang yuanwang communication technolgy Co, Ltd”,
“zhejiang ebang communication Co, Ltd”,
“zhejiang Dusun Electron Co, Ltd”,
“zhejiang Anhong Tech Co, Ltd”,
“z-max mediasolution”,
“yLez Tech Pte Ltd”,
“xxter b.v.”,
“xvtec Ltd”,
“xn systems”,
“xmi systems”,
]

```