This repository has been archived by the owner on Aug 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Providers
David Fernández Aldana edited this page Aug 27, 2016
·
14 revisions
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.
- 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.
- Create a new Python in the directory showed by the table named
name.py
where the name is the provider name in lowercase. - 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.
- Create a class named
ProviderName
where the Name is the provider name in StudlyCaps subclassing the class showed by the table. - Implement the function showed by the table.
- 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 isname.ProviderName
where the name is obviously the provider's name.
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 |