coolbho3k / manuf Goto Github PK
View Code? Open in Web Editor NEWParser library for Wireshark's OUI database.
License: Other
Parser library for Wireshark's OUI database.
License: Other
Helo everyone,
Python2 is deprecated and keeping it supported prevent us to have technicals improvement.
I suggest the next release don't support Python2,
Please write your thoughts,
Tristan
A working program, which I've not amended now fails. Has permission to the OUI database changed to deny access?
mac_addr_test.py", line 37, in
p = manuf.MacParser(update=True)
manuf.py", line 70, in init
self.update()
manuf.py", line 146, in update
raise URLError("Failed downloading OUI database")
urllib.error.URLError:
Same as #29 but now it's the wka file, ie.:
Updating the manuf file with manuf -u
gives an excpetion (see #29, it's the same)
Moved to https://gitlab.com/wireshark/wireshark/-/raw/master/wka or somewhere else. But the old url is gone
$ manuf -h
/usr/lib/python3.8/site-packages/manuf/manuf.py:147: SyntaxWarning: "is" with a literal. Did you mean "=="?
if response.code is 200:
/usr/lib/python3.8/site-packages/manuf/manuf.py:167: SyntaxWarning: "is" with a literal. Did you mean "=="?
if response.code is 200:
From daniel-leicht#4
The formatting of the wireshark.org file appears to have changed. Previously it used “ # “ as a separator for the full manufacturer name and a comment.
The file now appears to use “ # “ solely as a comment and as a result, after you update the manuf file from Wireshark's git, only true comments are displayed.
python manuf.py 08:00:89
Vendor(manuf=u'Kinetics', comment=u'Kinetics\t\t\tAppleTalk-Ethernet interface')
python manuf.py 1C:BD:B9:FF:E9:18
Vendor(manuf=u'D-LinkIn', comment=u'D-Link International')
python manuf.py D8:FC:93
Vendor(manuf=u'IntelCor', comment=u'Intel Corporate')
python manuf.py 00:40:1C
Vendor(manuf=u'AstPenti', comment=u'AST\t\t\t\tPentium/90 PC (emulating AMD EISA card)')
After update
python manuf.py --update
python manuf.py 08:00:89
Vendor(manuf=u'Kinetics', comment=u'AppleTalk-Ethernet interface')
python manuf.py 1C:BD:B9:FF:E9:18
Vendor(manuf=u'D-LinkIn', comment=None)
python manuf.py D8:FC:93
Vendor(manuf=u'IntelCor', comment=None)
python manuf.py 00:40:1C
Vendor(manuf=u'AstPenti', comment=u'Pentium/90 PC (emulating AMD EISA card)')
Looks like the wireshark project has replaced the manuf file with a .c file containing static arrays.
I'll try to come up with a pull request to fix this. It might take me a while.
Hi,
thanks for this tool! After the manuf file format change, would it be possible to get a new release with the new parser published to PyPI?
It would be nice if you could run an update like so
python -m manuf --update
Instead of having to find the path to the python script
Adding a __main__.py
allows this
from manuf import main
if __name__ == "__main__":
main()
Hey,
It seems like current version published on pip (and master
here as well) exposes MacParser
class in manuf.manuf.MacParser
path. This is pretty strange, and makes an example in README slightly wrong (import manuf ; p = manuf.MacParser()
)
You can either from .manuf import MacParser
in manuf/__init__.py
as a backward-compatible solution, or just get rid of manuf.py
all together and move everything over to __init__.py
.
Need a way to download and merge manuf and wfa files.
Wireshark commit:
Put the well-known addresses into a separate file from OUIs
Having two distinct logical concepts (OUI and Well Known Address)
concatenated to a single "manuf" file is needlessly obfuscating
the WKA feature.
Have a distinct "wka" file instead and just skip the cat.
Change-Id: I46f53b0015a37331d65f8cfac7cbbd499dd0c5b8
Reviewed-on: https://code.wireshark.org/review/22742
Petri-Dish: Michael Mann [email protected]
Tested-by: Petri Dish Buildbot [email protected]
Reviewed-by: Michael Mann [email protected]
I use this excellent tool, but noticed my manuf library wasn't returning the mac vendor successfully. When I started debugging the code, I found the URLError exception was raised "Failed downloading OUI database". I think the MANUF_URL might need some attention:
https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf
Hello Everyone,
It looks like this repository has been left alone by it's owner @coolbho3k for a couple years now...
@daniel-leicht has forked the repository and continues (last edit was 13 month ago) to maintain this software at https://github.com/daniel-leicht/manuf-ng
I encourage all of the interested people to check it out and transfer their pull request and issues to this new repository.
$ manuf -u
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/manuf/manuf.py", line 164, in update
response = urlopen(Request(wfa_url, headers={'User-Agent': 'Mozilla'}))
File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/manuf", line 33, in <module>
sys.exit(load_entry_point('manuf==1.1.1', 'console_scripts', 'manuf')())
File "/usr/lib/python3.9/site-packages/manuf/manuf.py", line 324, in main
parser = MacParser(manuf_name=args.manuf, update=args.update)
File "/usr/lib/python3.9/site-packages/manuf/manuf.py", line 70, in __init__
self.update()
File "/usr/lib/python3.9/site-packages/manuf/manuf.py", line 166, in update
raise URLError("Failed downloading WFA database")
urllib.error.URLError: <urlopen error Failed downloading WFA database>
It seems https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf has moved to https://gitlab.com/wireshark/wireshark/raw/master/manuf
Please update the script. Thanks
Hello, just a quick note to advise that I plan to drop support python2 in the next version.
If you need manuf to still supports python2, please send PRs to setup proper testing environment for python2 and fix eventual syntax error.
Should test entire manuf file and generate testing methodology on arbitrary manuf file
I like the tool very much, however, my environment is locked behind a proxy where I would need to specify to run manuf --update
Tried to install with:
$ pip install manuf
Downloading/unpacking manuf
Could not find any downloads that satisfy the requirement manuf
Cleaning up...
No distributions at all found for manuf
Just in the last few days I noticed my scripts using manuf.py started failing to get the manuf database from gitlab.
I'm not sure what changed, but I tried installing it on my vdi clean and it is reproducible.
I am able to see the database in the manuf_url from the module using chrome on the same system.
Nick
$ python3
Python 3.6.8 (default, Feb 14 2019, 22:09:48)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from manuf import manuf
>>> p = manuf.MacParser(update=True)
Traceback (most recent call last):
File "/home/nicko/manuf/manuf/manuf.py", line 142, in update
response = urlopen(manuf_url)
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 564, in error
result = self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nicko/manuf/manuf/manuf.py", line 68, in __init__
self.update()
File "/home/nicko/manuf/manuf/manuf.py", line 144, in update
raise URLError("Failed downloading OUI database")
urllib.error.URLError: <urlopen error Failed downloading OUI database>
>>>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.