Skip to content

Instantly share code, notes, and snippets.

diff -ru pylibpcap-0.6.4/pcap.c pylibpcap-0.6.4-mac/pcap.c
--- pylibpcap-0.6.4/pcap.c 2012-01-05 19:13:47.000000000 -0500
+++ pylibpcap-0.6.4-mac/pcap.c 2014-04-11 20:29:02.000000000 -0400
@@ -1,15 +1,16 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
- *
- * This file is not intended to be easily readable and contains a number of
+ * Version 3.0.0
--- scapy-2.1.0-rfmon/scapy/arch/pcapdnet.py 2009-09-23 10:27:36.000000000 -0400
+++ scapy-2.1.0/scapy/arch/pcapdnet.py 2014-04-11 20:54:49.000000000 -0400
@@ -52,7 +52,14 @@
class _PcapWrapper_libpcap:
def __init__(self, *args, **kargs):
self.pcap = pcap.pcapObject()
- self.pcap.open_live(*args, **kargs)
+ if sys.platform == 'darwin' and 'pcap_set_rfmon' not in dir(self.pcap):
+ warning("Mac OS WiFI monitor mode not supported unless python-libpcap patched for OS X is used.")
+
diff --git a/Library/Formula/libdnet_python.rb b/Library/Formula/libdnet_python.rb
new file mode 100644
index 0000000..31f0446
--- /dev/null
+++ b/Library/Formula/libdnet_python.rb
@@ -0,0 +1,18 @@
+require 'formula'
+
+class LibdnetPython <Formula
+ depends_on 'libdnet'
#!/usr/bin/env python
from scapy.all import *
from datetime import datetime
import sys
import time
found = {}
def sniffmgmt(p):