Package: macloot
MAC Address Lookup and TransformationThis command line application allows you to lookup theOrganizationallyUniqueIdentifier (OUI) of MAC addresses, either from a file or from standard input (stdin). Additionally, it provides functionality to transform MAC addresses between different formats.IntroductionTheMACAddressLookup andTransformation (macloot) tool provides a convenient way to retrieve theOrganizationallyUniqueIdentifier (OUI) associated with a MAC address. It utilizes the IEEE OUI database to perform the lookup and offers options to process MAC addresses from a file or interactively through stdin.Supported formatsThemaclootapplication is designed to effortlessly identify MAC addresses within any text input and parse them. Whether you have a large document, log files, or even user-provided input, the application intelligently scans the text to extract MAC addresses. This capability ensures that you can easily work with MAC addresses regardless of their context, simplifying the process of retrieving and manipulating these unique identifiers.maclootaccurately matches the most commonly used MAC addresses:11:22:33:AA:BB:CC11-22-33-AA-BB-CCaa:bb:cc:dd:ee:ffaa-bb-cc-dd-ee-ffaaaa.bbbb.ccccAAAA.BBBB.CCCC112233AABBCCaabbccddeeffInstallationInstallingmaclootis a breeze. Simply use the following command to install it viapip:pipinstallmaclootNosudois required for installing the application as it will be installed in your home directory.The application does not include the OUI database by default but retrieves it from a trusted source (https://standards-oui.ieee.org/oui/oui.csv). Upon first run, it prompts you to download the latest version for up-to-date MAC address lookups. You have full control over initiating the download, ensuring data source approval.Basic UsageTo use the MAC Address Lookup and Transformation application, follow these steps:Run the script with a MAC address file as input:maclootpath/to/mac_addresses.txtAlternatively, provide MAC addresses through stdin:macloot00:11:22:33:44:55Why not pipe (|) the output ififconfiginto the application:ifconfig|maclootSave the results fromarp -ainto a CSV filearp.csvusing;as a delimiting character:arp-a|macloot-oarp.csv-d";"The application will display the organization name associated with each MAC address found in the input.Advanced UsageThe MAC Address Lookup and Transformation application offers additional features and options:Format TransformationTo transform MAC addresses between formats, use the-Oor--octet-separatorargument followed by a hyphen-, a colon:or a dot.as the format specifier. This allows for convenient and quick conversion of MAC address formats.Cisco style (using-O .)To convert MAC addresses to Cisco'saaaa.bbbb.ccccformat, use the following command:macloot24:16:1b:2c:3d:4e-O.Output:2416.1b2c.3d4eCiscoSystems,IncMicrosoft style (using-O -)To convert MAC addresses to Microsoft'sAA-BB-CC-DD-EE-FFformat, use the following command:macloot1c1a.dfa1.b2c3-O--uOutput:1C-1A-DF-A1-B2-C3MicrosoftCorporationLinux style (using-O :)To convert MAC addresses to Linux'saa:bb:cc:dd:ee:ffformat, use the following command:macloot2c-c8-1b-a1-b2-c3-O:Output:2c:c8:1b:a1:b2:c3Routerboard.comCharacter CasingTo modify the character casing of MAC addresses in the output, you can utilize the-lor--lowercaseand-uor--uppercasearguments. Using-lwill convert the output MAC addresses to lowercase, while-uwill convert them to uppercase.If neither of these arguments is provided, the original casing of the input MAC addresses will be preserved in the output.UppercaseIn this example we convert a MAC address in Cisco format to the format Microsoft uses (with hyphens, inuppercase) by using the-uargument:macloot1c1a.dfa1.b2c3-O--uOutput:1C-1A-DF-A1-B2-C3MicrosoftCorporationLowercaseIn this example we do the opposite, convert a MAC address in Microsoft format to the format Cisco uses (with dots, inlowercase) by using the-largument:macloot24:16:1B:2C:3D:4E-O.-lOutput:2416.1b2c.3d4eCiscoSystems,IncSearchTo search for OUIs based on company names, you can utilize the-sor--searchargument. By providing the desired company name as the argument value, such as "Cisco," "Apple," or "Microsoft," you can retrieve the corresponding OUIs associated with those companies. This feature enables easy lookup and identification of OUIs based on the names of specific organizations.macloot-smicrosoftOutput:0003FFMicrosoftCorporation
000D3AMicrosoftCorporation
00125AMicrosoftCorporation
00155DMicrosoftCorporation
0017FAMicrosoftCorporation
...(outputtruncated)...To make the output compatible with CSV format, you can use the-d ";"option here as well.Update OUI databaseYou can easily update the OUI database at any time by running the command:macloot--update-dbThis command initiates the process of fetching the latest version of the OUI database, ensuring that you have the most recent information for accurate MAC address lookups. By offering a simple command to update the database, the application enables you to stay current with the evolving OUI data without any hassle.ContributingContributions are welcome! If you encounter any issues or have suggestions for improvements, please submit a GitHubissueor apull request.LicenseThis project is licensed under theMIT License.