Scapy: Difference between revisions
From charlesreid1
(→Fixing) |
|||
| Line 15: | Line 15: | ||
==NameError: global name dnet is not defined== | ==NameError: global name dnet is not defined== | ||
On starting Scapy, I was seeing | On starting Scapy, I was seeing an error related to dnet. | ||
Scapy has a number of dependencies on the Mac. One of them is a Python module that wraps a C library called dnet. If you try to install pydnet using pip, you will get errors when you run Scapy. But you can install libdnet from source, then build the Python extension yourself. | Scapy has a number of dependencies on the Mac. One of them is a Python module that wraps a C library called dnet. If you try to install pydnet using pip, you will get errors when you run Scapy. But you can install libdnet from source, then build the Python extension yourself. | ||
| Line 39: | Line 34: | ||
</pre> | </pre> | ||
Alternatively, you could use Homebrew to install libdnet and then install scapy, but that requires you to use Homebrew's Python - you can't mix, for example, a Python.org python install with a Homebrew install of Scapy. | |||
Revision as of 01:28, 11 January 2016
Scapy
Scapy is a Python library for parsing out wireless information. Imagine an API for your hardware, aircrack, nmap, tcpdump, traceroute, and various other networking utilities, all rolled into one Python library. That's Scapy.
References
Great intro to scapy's many functions: http://www.secdev.org/projects/scapy/demo.html
Great video tutorial: https://www.youtube.com/watch?v=-s4iyNSxs1k
Same setup, with a small battery-powered router: http://minipwner.com/index.php/forum/6-minipnwer-use/1787-my-experience-with-aircrack
Installing Scapy on Mac
NameError: global name dnet is not defined
On starting Scapy, I was seeing an error related to dnet.
Scapy has a number of dependencies on the Mac. One of them is a Python module that wraps a C library called dnet. If you try to install pydnet using pip, you will get errors when you run Scapy. But you can install libdnet from source, then build the Python extension yourself.
Hat tip to this page: http://juhalaaksonen.com/blog/2013/12/11/installing-scapy-for-mac-os-x/
#!/bin/sh wget http://libdnet.googlecode.com/files/libdnet-1.12.tgz tar xfz libdnet-1.12.tgz cd libdnet-1.12 ./configure make sudo make install cd python sudo python setup.py install
Alternatively, you could use Homebrew to install libdnet and then install scapy, but that requires you to use Homebrew's Python - you can't mix, for example, a Python.org python install with a Homebrew install of Scapy.