booyaa / wifiscanner

A crate to list WiFi hotspots in your area
Apache License 2.0
59 stars 34 forks source link

release a new version to crates.io #48

Open MeitarR opened 3 years ago

MeitarR commented 3 years ago

I was using 0.5.1 and tried to the example code

use wifiscanner;

fn main() {
    println!("{:?}", wifiscanner::scan());
}

and got the output

Ok([])

(while I know it can scan some APs)

So I started to look at the code and it looked good
then I cloned the repo and run the example code and got different (the expected one)

Err(CommandFailed(ExitStatus(ExitStatus(65280)), "command failed: Operation not permitted (-1)\n"))

So 0.5.1 has a bug that is fixed at main branch

saillimited commented 2 years ago

Me too. (俺也一样。。)

tronch0 commented 2 years ago

Yo Meitar so I dont understand, which version is good? For me, the 0.5.1 version return empty array, and the main branch is returning this error: Err(CommandFailed(ExitStatus(ExitStatus(65280)), "command failed: Operation not permitted (-1)\n"))

I need to hack the neighbours please help!

MeitarR commented 2 years ago

Yo Meitar so I dont understand, which version is good? For me, the 0.5.1 version return empty array, and the main branch is returning this error: Err(CommandFailed(ExitStatus(ExitStatus(65280)), "command failed: Operation not permitted (-1)\n"))

I need to hack the neighbours please help!

The main is the fixed one. You need to run the process as root to be able to scan