Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.
/ mac-attrs Public archive

mac-attrs is a web app that evaluates the attributes of MAC addresses.

License

Notifications You must be signed in to change notification settings

critical-path/mac-attrs

Repository files navigation

https://travis-ci.com/critical-path/mac-attrs.svg?branch=master https://coveralls.io/repos/github/critical-path/mac-attrs/badge.svg?branch=master Documentation Status

Introduction

mac-attrs combines the functionality of macaddress and random-mac into a web app that evaluates the attributes of media access control (MAC) addresses.

Installing mac-attrs

mac-attrs is available on GitHub at https://github.com/critical-path/mac-attrs.

If you do not have pip version 18.1 or higher, then run the following command from your shell.

[user@host ~]$ sudo pip install --upgrade pip

To install mac-attrs with test-related dependencies, run the following command from your shell.

[user@host ~]$ sudo pip install --editable git+https://github.com/critical-path/mac-attrs.git#egg=mac-attrs[test]

To install it without test-related dependencies, run the following command from your shell.

[user@host ~]$ sudo pip install git+https://github.com/critical-path/mac-attrs.git

(If necessary, replace pip with pip3.)

Starting mac-attrs

Before starting mac-attrs for the first time, run the following commands from your shell.

[user@host mac-attrs]$ chmod +x ./get-started.sh
[user@host mac-attrs]$ ./get-started.sh

To start mac-attrs, run the following command from your shell.

[user@host mac-attrs]$ gunicorn --bind=0.0.0.0:8080 --workers=2 "mac_attrs:make_app()"

Using mac-attrs

Using mac-attrs is easy!

First, point your browser to any of the following URLs.

  • http://localhost:8080/
  • http://localhost:8080/home
  • http://localhost:8080/home.html
  • http://localhost:8080/index
  • http://localhost:8080/index.html
  • http://localhost:8080/mac-attrs
  • http://localhost:8080/mac-attrs.html

Second, type a MAC address.

Third, click on the submit button.

Fourth, view the results.

Testing mac-attrs

To conduct testing, run the following command from your shell.

[user@host mac-attrs]$ pytest --disable-warnings --cov --cov-report=term-missing

If pytest raises an INTERNALERROR, then run the following command from your shell.

[user@host mac-attrs]$ sudo $(which pytest) --disable-warnings --cov --cov-report=term-missing