Skip to content
This repository has been archived by the owner on Aug 4, 2018. It is now read-only.

Providers

David Fernández Aldana edited this page Aug 27, 2016 · 14 revisions

Introduction

Providers suggest to the system how to proceed depending on the OUI (vendor part of the BSSID) of the AP in two ways:

  • Possible WPS pins.
  • Possible tools that can generate the WPS pins.

Types

  • Offline: no internet is required, the whole database is directly builtin in the class file.
  • Online: internet is required
  • Queryable: a single OUI is checked at a time when the generate action is executed.
  • Downloadable: the whole database is downloaded when the update_db action is executed.

Creating a new provider

  1. Create a new Python in the directory showed by the table named name.py where the name is the provider name in lowercase.
  2. Import the libraries as needed (try to not use any external dependency), you may use:
  • requests to do HTTP(S) requests.
  • pyquery to parse (X)HTML responses.
  • netaddr to parse and manipulate BSSID's.
  1. Create a class named ProviderName where the Name is the provider name in StudlyCaps subclassing the class showed by the table.
  2. Implement the function showed by the table.
  3. Add a dictionary key to the list.py file in the subfolder shown by the table, where the key is provider's name and the value is name.ProviderName where the name is obviously the provider's name.

Cheatsheet table

Type Directory Base class Function signature
Offline offline DumpProviderBase
(core/base.py)
def load_all() -> ProviderResults
Online
(downloadable)
online/
downloadable
Online
(queryable)
online/
queryable
OnlineQueryableProviderBase
(online/queryable/core/base.py)
def load(mac: EUI) -> ProviderResult
Clone this wiki locally