etherlyzer 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tobias Andersen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,387 @@
1
+ Metadata-Version: 2.4
2
+ Name: etherlyzer
3
+ Version: 0.5.1
4
+ Summary: Fast offline lookup and classification of Ethernet-related identifiers.
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: ethernet,mac-address,oui,ieee,ethertype,networking,cybersecurity,asset-discovery,network-automation
8
+ Author: Tobias Andersen
9
+ Requires-Python: >=3.14
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Information Technology
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: System :: Networking
19
+ Classifier: Topic :: Security
20
+ Classifier: Typing :: Typed
21
+ Requires-Dist: pandas (>=3.0.5,<4.0.0)
22
+ Requires-Dist: platformdirs (>=4.10.0,<5.0.0)
23
+ Requires-Dist: python-dotenv (>=1.2.2,<2.0.0)
24
+ Requires-Dist: requests (>=2.34.2,<3.0.0)
25
+ Requires-Dist: tqdm (>=4.70.1,<5.0.0)
26
+ Project-URL: Homepage, https://github.com/blue-hexagon/EtherLyzer
27
+ Project-URL: Issues, https://github.com/blue-hexagon/EtherLyzer/issues
28
+ Project-URL: Repository, https://github.com/blue-hexagon/EtherLyzer
29
+ Description-Content-Type: text/markdown
30
+
31
+ # EtherLyzer
32
+
33
+ EtherLyzer is a Python library and command-line utility for identifying, classifying, and working with Ethernet-related identifiers.
34
+
35
+ It provides fast, high-performance offline lookups:
36
+
37
+ * IEEE MAC address registries (OUI, MA-L/OUI-24, MA-M/OUI-28, MA-S/OUI-36, CID, IAB)
38
+ * Protocol identifiers (Ethertypes)
39
+ * Block sizes, vendor names, addresses and correlation
40
+
41
+ Etherlyzer provides a CLI utilty supporting both single and bulk-processing, as well as a Python library and builds high-performance indexes of current up to date datasets.
42
+
43
+ EtherLyzer is designed for network engineers, cybersecurity professionals, automation, and asset discovery.
44
+
45
+ ## What can EtherLyzer do?
46
+
47
+ EtherLyzer maintains a local copy of IEEE registries, enabling fast, offline lookups without requiring Internet access and sharing MAC adresses with a third-party that might collect your searches and correlate them with your IP and more.
48
+
49
+ Typical use cases include:
50
+
51
+ * Identify the manufacturer of a MAC address.
52
+ * Distinguish between MA-L, MA-M, and MA-S allocations.
53
+ * Look up EtherTypes (e.g. IPv4, IPv6, ARP, LLDP).
54
+ * Identify vendor information.
55
+ * Bulk-process vendor information, address allocations or validate and normalize thousands of MAC addresses from CLI/API in seconds.
56
+ * Build high-performance lookup indexes for repeated searches.
57
+ * Automatically synchronize the local IEEE registry database (update interval configurable).
58
+ * Validate, normalize and format MAC addresses from and to, virtually any format.
59
+ * Export lookup results as CSV or other delimited formats.
60
+ * Integrate into automation scripts, inventory systems, NAC workflows, NOC/SOC tooling and asset discovery solutions.
61
+
62
+
63
+ Etherlyzer automatically fetches the official IEEE registry listings once every 24 hours, ensuring that the local registry data remains up to date. IEEE states that its public listings are updated every 24 hours.
64
+
65
+ The synchronization interval can be adjusted to your preference in the shipped `etherlyzer.env` file.
66
+
67
+ ## Showcasing
68
+
69
+ ### Commandline Interface
70
+ ```text
71
+ usage: etherlyzer [-h] [-v] {validize,format,update,info,identify} ...
72
+
73
+ EtherLyzer - Ethernet lookup and analysis toolkit
74
+
75
+ options:
76
+ -h, --help show this help message and exit
77
+ -v, --version show program's version number and exit
78
+
79
+ Commands:
80
+ {validize,format,update,info,identify}
81
+ validize Validates and normalizes MAC addresses
82
+ format Format MAC address
83
+ update Synchronize IEEE registries
84
+ info Show application information
85
+ identify Search vendors, protocols or assignments
86
+ ```
87
+
88
+ ### MAC Hardware Vendor Identification
89
+
90
+ IAB is also registered in the MA-L listings under `IEEE Registration`, but if we provide a specific hardware address (e.g. the first 9 hex-digits) we can identify the IAB (doing longest-prefix match).
91
+
92
+
93
+ ```text
94
+ > etherlyzer identify 00-50-C2f71
95
+
96
+ Organization
97
+ Name : RF
98
+ Full Name : RF Code
99
+ Address
100
+ 9229 Waterford Centre Blvd #500 Austin TX US 78758
101
+
102
+ Registry
103
+ IEEE Type : IAB [Individual Address Block]
104
+ Assignment : 00-50-c2-f7-1
105
+ Range : 00-50-c2-f7-10-00 - 00-50-c2-f7-1f-ff
106
+ Legacy : True
107
+ Legacy Name : None
108
+ Prefix Bits : 36 bits
109
+ Address Bits : 12 bits
110
+ Addresses : 4,096
111
+
112
+ Vendor Blocks
113
+ Total Blocks : 10
114
+ Address Capacity
115
+ Total : 40,960
116
+ MA-L : 0
117
+ MA-M : 0
118
+ MA-S : 16,384
119
+ IAB : 24,576
120
+ Registered Blocks (B=IAB, S=MA-S, M=MA-M, L=MA-L)
121
+ [B] 00-50-c2-1a-6 [B] 00-50-c2-68-9 [B] 00-50-c2-be-5 [B] 00-50-c2-db-1 [B] 00-50-c2-f7-1
122
+ [B] 40-d8-55-19-4 [S] 70-b3-d5-94-b [S] 70-b3-d5-a5-1 [S] 70-b3-d5-ad-b [S] 8c-1f-64-59-6
123
+ ```
124
+
125
+ ### Validate and Normalize MAC Addresses
126
+
127
+ Validation runs first after which candidates are normalized and optionally a masked output of the MACs failing validation are output.
128
+
129
+ The validation shows the specific errors using single-character mask-flags.
130
+
131
+ ```text
132
+ v = valid hex digit
133
+ M = missing digit
134
+ V = excess valid hex digit
135
+ I = invalid character
136
+ r/R = relaxed typo candidate
137
+ l/L = lenient typo candidate
138
+ ```
139
+
140
+ The command output is also customizable:
141
+
142
+ Options:
143
+ ```text
144
+ usage: etherlyzer validize [-h] [-b] [-l] [-s] [-o] [-n] [mac]
145
+
146
+ positional arguments:
147
+ mac MAC address to normalize
148
+
149
+ options:
150
+ -h, --help show this help message and exit
151
+ -b, --bulk Read multiple MAC addresses interactively
152
+ -l, --linenumbers Show linenumbers corresponding to each MAC address (kind of only useful when validizing in bulk)
153
+ -s, --strict Only return MAC's that can be normalized without errors.
154
+ -o, --show-originals Displays the original MAC addresses after the normalized MAC address on each line.
155
+ -n, --no-info Doesn't display an OK or ERR before each line depending on whether the outout succeeded normalization.
156
+ ```
157
+
158
+ ```text
159
+ etherlyzer validize --bulk --linenumbers
160
+
161
+ Paste MAC addresses. Enter a triple semicolon ;;; when done:
162
+ 001a2b3c4d5e
163
+ 001a2b3c4d5
164
+ 001a2b3c4d5e6
165
+ 001a2b3c4d5?
166
+ 001a2b3c4d5O
167
+ 001a2b3c4d5I
168
+ 001a2b3c4d5L
169
+ 001a2b3c4d5S
170
+ 001a2b3c4d5eF
171
+ 001a2b3c4d5eO
172
+ 001a2b3c4d5eI
173
+ 001a2b3c4d5eL
174
+ 001a2b3c4d5eS
175
+ 001a2b3c4d5e?
176
+ 001a2b3c4d5eFF
177
+ 001a2b3c4d5eOO
178
+ 001a2b3c4d5eII
179
+ 001a2b3c4d5eSS
180
+ 00:1a:2b:3c:4d:5e
181
+ 00-1a-2b-3c-4d-5e
182
+ 001a.2b3c.4d5e
183
+ 0:0:1:a:2:b:3:c:4:d:5:e
184
+ 00 : 1a : 2b : 3c : 4d : 5e
185
+ "00:1a:2b:3c:4d:5e"
186
+ 00::1a::2b::3c::4d::5e
187
+ 00:1a-2b.3c:4d-5e
188
+ ;;;
189
+
190
+ OK 001a2b3c4d5e << 001a2b3c4d5e
191
+ ERR 001a2b3c4d5 >> vvvvvvvvvvvM
192
+ ERR 001a2b3c4d5e6 >> vvvvvvvvvvvvV
193
+ ERR 001a2b3c4d5 >> vvvvvvvvvvvM
194
+ ERR 001a2b3c4d5O >> vvvvvvvvvvvr
195
+ ERR 001a2b3c4d5I >> vvvvvvvvvvvl
196
+ ERR 001a2b3c4d5L >> vvvvvvvvvvvl
197
+ ERR 001a2b3c4d5S >> vvvvvvvvvvvl
198
+ ERR 001a2b3c4d5ef >> vvvvvvvvvvvvV
199
+ ERR 001a2b3c4d5eO >> vvvvvvvvvvvvR
200
+ ERR 001a2b3c4d5eI >> vvvvvvvvvvvvL
201
+ ERR 001a2b3c4d5eL >> vvvvvvvvvvvvL
202
+ ERR 001a2b3c4d5eS >> vvvvvvvvvvvvL
203
+ OK 001a2b3c4d5e << 001a2b3c4d5e?
204
+ ERR 001a2b3c4d5eff >> vvvvvvvvvvvvVV
205
+ ERR 001a2b3c4d5eOO >> vvvvvvvvvvvvRR
206
+ ERR 001a2b3c4d5eII >> vvvvvvvvvvvvLL
207
+ ERR 001a2b3c4d5eSS >> vvvvvvvvvvvvLL
208
+ OK 001a2b3c4d5e << 00:1a:2b:3c:4d:5e
209
+ OK 001a2b3c4d5e << 00-1a-2b-3c-4d-5e
210
+ OK 001a2b3c4d5e << 001a.2b3c.4d5e
211
+ OK 001a2b3c4d5e << 0:0:1:a:2:b:3:c:4:d:5:e
212
+ OK 001a2b3c4d5e << 00 : 1a : 2b : 3c : 4d : 5e
213
+ OK 001a2b3c4d5e << "00:1a:2b:3c:4d:5e"
214
+ OK 001a2b3c4d5e << 00::1a::2b::3c::4d::5e
215
+ OK 001a2b3c4d5e << 00:1a-2b.3c:4d-5e
216
+
217
+ Normalized 10/26 MAC addresses. Invalid MAC addresses identified: 16/26
218
+ ```
219
+ ### Format Nasty MAC Addresses
220
+
221
+ ```shell
222
+ etherlyzer format l..iIdOØ1!23-4oo.. --fix-typos --casing "upper" --block-size 4 --separator .
223
+
224
+ 111D.0012.3400
225
+ ```
226
+
227
+ ## Configuration
228
+
229
+ The included `etherlyzer.env` file provides sensible defaults and works out of the box but is configurable.
230
+
231
+
232
+ ```dotenv
233
+ #---------------------------------------------------DATASET
234
+ # Maximum age of the local IEEE database before synchronization, in hours
235
+ DB_UPDATE_INTERVAL_HOURS=24
236
+
237
+ #---------------------------------------------------EXPORT
238
+ # Field delimiter used for CSV and stdout output
239
+ FIELD_SEPARATOR="\t"
240
+ # MAC address formatting
241
+ # Supported separators: :, -, ., or an empty value
242
+ MAC_SEPARATOR=-
243
+ # Number of hexadecimal characters per block
244
+ # 2 -> 00:11:22:33:44:55
245
+ # 4 -> 0011.2233.4455
246
+ MAC_BLOCK_SIZE=2
247
+ # Supported values: upper, lower
248
+ MAC_CASE=lower
249
+
250
+ #---------------------------------------------------DISPLAY
251
+ # Print database synchronization messages
252
+ SHOW_SYNC_MESSAGES=true
253
+
254
+ #---------------------------------------------------INPUT (deprecated - will use stdin in future)
255
+ # Read lookup values from a text file
256
+ USE_FILE_ENABLED=true
257
+ # Input filename relative to the configured input directory
258
+ USE_FILE=in.txt
259
+ ```
260
+
261
+ ## Data Layer
262
+
263
+ From the command-line: `etherlyzer info` you can inspect the different registries where data is gathered from and inspect synchronization.
264
+
265
+ ```text
266
+ (etherlyzer-py3.14) PS C:\Users\T\Desktop\EtherTools> etherlyzer info
267
+
268
+ EtherLyzer 0.3.0
269
+
270
+ Registries
271
+ IEEE Name: MA-L (MAC Address Block Large)
272
+ Legacy Name: OUI
273
+ Category: mac
274
+ Description: Large IEEE MAC address allocation. Formerly known as the Organizationally Unique Identifier (OUI). Used by vendors requiring large address spaces.
275
+ Is Legacy: False
276
+ Filepath: C:\Users\T\AppData\Local\Manjana\etherlyzer\Cache\1.0\MA-L.csv
277
+ URL: https://standards-oui.ieee.org/oui/oui.csv
278
+ Prefix bits: 24
279
+ Last retrieved: 2026-09-28 17:33:17.442158+00:00
280
+ Update interval: 1 day, 0:00:00
281
+
282
+ IEEE Name: MA-M (MAC Address Block Medium)
283
+ Legacy Name: OUI-28
284
+ Category: mac
285
+ Description: Medium-sized IEEE MAC address allocation intended for organizations requiring fewer addresses than MA-L.
286
+ Is Legacy: False
287
+ Filepath: C:\Users\T\AppData\Local\Manjana\etherlyzer\Cache\1.0\MA-M.csv
288
+ URL: https://standards-oui.ieee.org/oui28/mam.csv
289
+ Prefix bits: 28
290
+ Last retrieved: 2026-09-28 17:33:20.061122+00:00
291
+ Update interval: 1 day, 0:00:00
292
+
293
+ IEEE Name: MA-S (MAC Address Block Small)
294
+ Legacy Name: OUI-36
295
+ Category: mac
296
+ Description: Small IEEE MAC address allocation for embedded devices, IoT, industrial equipment, and smaller manufacturers.
297
+ Is Legacy: False
298
+ Filepath: C:\Users\T\AppData\Local\Manjana\etherlyzer\Cache\1.0\MA-S.csv
299
+ URL: https://standards-oui.ieee.org/oui36/oui36.csv
300
+ Prefix bits: 36
301
+ Last retrieved: 2026-09-28 17:33:22.278145+00:00
302
+ Update interval: 1 day, 0:00:00
303
+
304
+ IEEE Name: CID (Company Identifier)
305
+ Legacy Name: None
306
+ Category: identifier
307
+ Description: Unique company identifiers assigned by IEEE. Identifies organizations independently of MAC address allocations.
308
+ Is Legacy: False
309
+ Filepath: C:\Users\T\AppData\Local\Manjana\etherlyzer\Cache\1.0\CID.csv
310
+ URL: https://standards-oui.ieee.org/cid/cid.csv
311
+ Prefix bits: None
312
+ Last retrieved: 2026-09-28 17:33:25.409803+00:00
313
+ Update interval: 1 day, 0:00:00
314
+
315
+ IEEE Name: IAB (Individual Address Block)
316
+ Legacy Name: None
317
+ Category: mac
318
+ Description: Legacy IEEE MAC address allocation scheme superseded by MA-S. Retained for compatibility with older hardware.
319
+ Is Legacy: True
320
+ Filepath: C:\Users\T\AppData\Local\Manjana\etherlyzer\Cache\1.0\IAB.csv
321
+ URL: https://standards-oui.ieee.org/iab/iab.csv
322
+ Prefix bits: 36
323
+ Last retrieved: 2026-09-28 17:33:27.785458+00:00
324
+ Update interval: 1 day, 0:00:00
325
+
326
+ IEEE Name: EtherType (EtherType Registry)
327
+ Legacy Name: None
328
+ Category: protocol
329
+ Description: Registry mapping EtherType values to Ethernet protocols, including IPv4, IPv6, ARP, VLAN tagging, LLDP, MPLS, 802.1X, and many vendor-specific protocols.
330
+ Is Legacy: False
331
+ Filepath: C:\Users\T\AppData\Local\Manjana\etherlyzer\Cache\1.0\EtherType.csv
332
+ URL: https://standards-oui.ieee.org/ethertype/eth.csv
333
+ Prefix bits: None
334
+ Last retrieved: 2026-09-28 17:33:29.763446+00:00
335
+ Update interval: 1 day, 0:00:00
336
+ ```
337
+
338
+ ## Installation
339
+
340
+ ### Developer Installation
341
+
342
+ ```text
343
+ git clone https://github.com/blue-hexagon/Etherlyzer
344
+ poetry install
345
+ poetry env activate
346
+ ```
347
+
348
+ ### Library Installation
349
+
350
+ ```text
351
+ poetry env activate
352
+ poetry add etherlyzer
353
+ ```
354
+
355
+ ### CLI Installation
356
+
357
+ ```bash
358
+ pip install etherlyzer
359
+ ```
360
+
361
+ ## Project Structure
362
+
363
+ ```text
364
+ EtherLyzer/
365
+ ├── data/
366
+ ├── src/
367
+ │ └── etherlyzer/
368
+ ├── etherlyzer.env
369
+ ├── pyproject.toml
370
+ └── README.md
371
+ ```
372
+
373
+ ## Requirements
374
+
375
+ Developed with:
376
+
377
+ * Python 3.14+
378
+ * Poetry
379
+
380
+ The project may also run on earlier Python versions with minor modifications, although Python 3.14 is the officially supported development target for now.
381
+
382
+ ## License
383
+
384
+ This project is released under the MIT License.
385
+
386
+ You're free to use, modify, distribute, and sell it with very few restrictions. See the `LICENSE` file for details.
387
+