Skip to content

generate random MAC addresses with a valid manufacturer prefix

Notifications You must be signed in to change notification settings

SaltyCybernaut/valid_MAC_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

valid_MAC_generator

Generate random MAC addresses with a valid manufacturer prefix. The manufacturer prefixes are obtained from oui.csv which is available from IEEE at http://standards-oui.ieee.org/oui/oui.csv

serializeCSV.py consumes oui.csv and creates a Python List object, serialized it and saves it to a file. This is to improve the performance of validMAC.py

validMAC.py picks a random manufacturer prefix and concatinates it to a randomly generated suffix

Dependencies

The only dependency is Python, the two scripts assume python3.5 is available, if it is not change the first line of each file to the version of Python available on the system.

The two files must be made executable with:

chmod +x serializeCSV.py
chmod +x validMAC.py

This is how you use them:

./serializeCSV.py --csv=oui.csv --file=serObj
./validMAC.py --list=serObj

Output

the output is a single MAC address sent to stdout with each octet separated by colons like this 01:23:45:67:89:AB

About

generate random MAC addresses with a valid manufacturer prefix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages