Giter VIP home page Giter VIP logo

ssid-logger's Introduction

A simple SSID logger

If you are looking for a low cpu usage SSID logger written in C for the GNU/Linux platform, you just found one named ssid-logger.

ssid-logger was mainly created to log SSIDs and export the collected data to Wigle.net. It is able to run on a rpi0 for example, without requiring 100% cpu usage.

You will need a wifi card that is able to run in monitor mode and a GPS device recognized by gpsd.

ssid-logger uses the pcap library to listen passively for beacon management frames broadcasted by wifi access points, using a wifi card in monitor mode. It parses each beacon to extract the minimum data required to export to wigle.net. It logs each beacon AP alongside its GPS coordinates, acquired via the gpsd daemon. It automatically hops between 802.11n channels, at the default rate of 3 per second.

It can log to a sqlite3 database (by default) or to a csv file.

This is an all-in-one solution to log SSIDs. Even though kismet is a great software; it's wardrive mode might not be light enough for a rpi0 (may be a rpi0 v2 ?)

Note: ssid-logger does not automatically export the collected data to wigle.net. You will have to do it manually, if you want to (there is a helper script in ./scripts).

Running

You run ssid-logger with:

$ sudo ssid-logger -i wlan0mon

where wlan0mon is a wifi interface already put in monitor mode.

The default output format is a sqlite3 database, named beacon.db. You can choose another name by using the -o switch. You can select to choose the csv format by using -f csv.

The complete usage:

Usage: ssid-logger -i IFACE [-f csv|sqlite3] [-o FILENAME] [-V] [-z] [-z]
  -i IFACE        interface to use
  -f csv|sqlite3  output format to use (default sqlite3)
  -o FILENAME     explicitly set the output filename
  -V              print version and exit
  -z              log ssid even if no gps coordinates are available
  -zz or -z -z    don't use gpsd and log all ssids

Dependencies

ssid-logger depends on the following libraries:

  • libpcap
  • libpthread
  • libnl and libnl-genl
  • libgps
  • libsqlite3
  • libwifi (if not found will be built as a subproject)

You also need gpsd up and running.

Examples

On Ubuntu 21.10 and later or Raspberry Pi OS, one needs to run the following command to install libraries and headers:

$ sudo apt install pkg-config libpcap0.8 libpcap0.8-dev libnl-3-200 libnl-3-dev libnl-genl-3-200 libnl-genl-3-dev gpsd libgps28 libgps-dev libsqlite3-dev libsqlite3-0 meson ninja-build

On archlinux-arm, this is (libnl is already installed):

$ sudo pacman -S libpcap gpsd sqlite3 meson ninja

Building

To build the executable, you need meson and ninja.

$ cd ssid-logger
$ meson build
$ ninja -C build

Helper scripts

  • sqlite3_to_csv.py will allow to convert a sqlite3 .db file to a .csv one, if you change your mind afterwards and wants a csv file instead of a sqlite3 db.
  • convert.py will allow you to get a GPS trace in GPX or KML format to visualize on a map your path, and the SSIDs encoutered. This will allow you to check your GPS device and see if it works OK.
  • upload_to_wiglenet.sh helps you to upload the collected data to wigle.net via cli
  • transactions.sh allows you to see your latest transactions/uploads on wigle.net

ssid-logger's People

Contributors

solsticedhiver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chatchu

ssid-logger's Issues

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.