Git Product home page Git Product logo

wifiscan's Introduction

wifiscan

go report card coverage godocs

A platform-independent WiFi scanning library for getting BSSID + RSSI from nearby access points. It should work on most Linux installations as well as Windows and OS X.

How does it work?

wifiscan works by calling the OS-specific Wifi scan utility and parsing the output. For Linux this is iwlist, for Windows it is netsh.exe and for OS X it is airport. Other systems are not supported at the moment (although, as long as they are Linux-based I believe you can install iwlist).

Install

go get -u github.com/schollz/wifiscan/...

Usage

You can use it in your Go code as:

wifis, err := wifiscan.Scan()
if err != nil {
    log.Fatal(err)
}
for _, w := range wifis {
    fmt.Println(w.SSID, w.RSSI)
}

You can also use the command-line tool as:

$ WIFI=wlan0 wifiscan
SSID                RSSI
f0:5c:19:a2:2a:01   -55
28:c6:8e:75:6f:cf   -58
f0:5c:19:a2:26:61   -72
90:72:40:1c:b8:96   -69
...

Note: When using with Linux you will need to add sudo to get a full scan.

Contributing

Pull requests are welcome. Feel free to...

  • Revise documentation
  • Add new features
  • Fix bugs
  • Suggest improvements

License

MIT

wifiscan's People

Contributors

schollz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.