Giter Site home page Giter Site logo

manuf's People

Contributors

abngal avatar antonandreyev avatar beercow avatar computeallthethings avatar coolbho3k avatar gte620v avatar jcannell avatar neil-orans avatar rene-d avatar rlaager avatar tirkarthi avatar tristanlatr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

manuf's Issues

Deprecating Python2

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

Failed to connect - Has URL permission changed to OUI Database?

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:

SyntaxWarning


$ 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

Wireshark file format change

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)')

Wireshark removed the manuf file

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.

New release on PyPI

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?

run library module as a script

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()

Strange import path

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.

Well Known Addresses in separate file

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]

Error 503

$ 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

Planning to drop python2 support

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.

Publish into pip

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

Failing to acquire database when update=?True

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>
>>>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.