16个版本
0.4.10 | 2024年5月16日 |
---|---|
0.4.8 | 2023年10月2日 |
0.4.7 | 2023年1月29日 |
0.4.5 | 2022年12月4日 |
0.3.2 | 2021年3月28日 |
#266 在 数据库接口
每月 252次下载
用于 netscanner
6MB
263 行
MAC地址查询工具
查询与MAC地址对应的详细信息(例如:组织、创建日期等...)
要求
- Rust 1.70+ (版2021)
编译
- 开发
cargo b
- 发布
cargo b --release
用法
您可以将此添加到您的Cargo.toml文件中
[dependencies]
mac_oui = "0.4.10"
如果您想使用内置的oui db;那么
[dependencies]
mac_oui = { version = "0.4.10", features = ["with-db"] }
然后
use mac_oui::Oui;
fn main () {
let oui_db = Oui::default();
assert!(oui_db.is_ok());
}
运行示例
您可以通过以下方式运行默认示例。
cargo run --example mac_lookup <mac address>
例如
cargo run --features="with-db" --example mac_lookup '70:B3:D5:e7:4f:81'
Finished dev [optimized + debuginfo] target(s) in 1.54s
Running `target/debug/examples/mac_lookup '70:B3:D5:e7:4f:81'`
Entry {
oui: "70:B3:D5",
is_private: false,
company_name: "Ieee Registration Authority",
company_address: "445 Hoes Lane Piscataway NJ 08554 US",
country_code: "US",
assignment_block_size: "MA-L",
date_created: "2014-01-12",
date_updated: "2016-04-27",
}
- 按制造商查询示例
$ cargo run --features="with-db" --example manufacturer_lookup "Apple, Inc"
Finished dev [optimized + debuginfo] target(s) in 0.02s
Running `target/debug/examples/manufacturer_lookup 'Apple, Inc'`
[
Entry {
oui: "...",
is_private: false,
company_name: "Apple, Inc",
company_address: "1 Infinite Loop Cupertino CA 95014 US",
country_code: "US",
assignment_block_size: "MA-L",
date_created: "2017-02-21",
date_updated: "2017-02-21",
},
<clip>....
]
- 获取制造商列表的示例
$ cargo run --features="with-db" --example db_stats
Finished dev [optimized + debuginfo] target(s) in 0.06s
Running `target/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",
]
依赖项
~1.8–2.7MB
~42K SLoC