2个版本

0.1.1 2020年7月14日
0.1.0 2020年7月13日

#782身份验证

MIT/Apache

14KB
310

fenrir

使用wigle.net等服务定位wifi设备

Crates.io Build Status MIT licensed Apache-2.0 licensed

文档

Wigle.net API

在wigle.net上创建账户后,访问 https://wigle.net/account 获取您的API令牌。它对应于“编码用于使用”字段。

use async_std::task;
use fenrir::api::*;
use fenrir::wigle::api::*;

fn main() -> Result<(), surf::Exception> {
    let token = std::env::var("WIGLE_TOKEN").expect("Provide your WIGLE_TOKEN as an environment variable");
    task::block_on(async {
        let wigle: Wigle = Fenrir::new(Some(token));
        let geo_response = wigle.geocode("1600 Amphitheatre Parkway").await?;
        dbg!(geo_response);

        let search_response = wigle.search_bssid("00:00:00:00:00:00").await?;
        dbg!(search_response);

        Ok(())
    })
}

## Mylnikov api

It does not require an API token, it is completely free.

```rust
use async_std::task;
use fenrir::api::*;
use fenrir::mylnikov::api::*;

fn main() -> Result<(), surf::Exception> {
    task::block_on(async {
        let mylnikov: Mylnikov = Fenrir::new(None);
        let search_response = mylnikov.search_bssid("00:00:00:00:00:00").await?;
        dbg!(search_response);

        Ok(())
    })
}

依赖项

~6MB
~145K SLoC