Skip to content

Instantly share code, notes, and snippets.

@nevdull77
Created April 13, 2014 20:12
Show Gist options
  • Save nevdull77/10600371 to your computer and use it in GitHub Desktop.
Save nevdull77/10600371 to your computer and use it in GitHub Desktop.
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'
+ depends_on :python
+ url 'http://libdnet.googlecode.com/files/libdnet-1.12.tgz'
+ homepage 'http://code.google.com/p/libdnet/'
+ sha1 '71302be302e84fc19b559e811951b5d600d976f8'
+
+ def install
+ ENV["CFLAGS"] = "-O3 -w -pipe"
+ system "./configure", "--disable-debug", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--mandir=#{man}"
+ system "make"
+ system "cd python && /usr/local/bin/python setup.py install"
+ end
+end
\ No newline at end of file
diff --git a/Library/Formula/pylibpcap.rb b/Library/Formula/pylibpcap.rb
new file mode 100644
index 0000000..c78e2be
--- /dev/null
+++ b/Library/Formula/pylibpcap.rb
@@ -0,0 +1,17 @@
+require 'formula'
+
+class Pylibpcap <Formula
+ depends_on :python
+ url 'http://downloads.sourceforge.net/project/pylibpcap/pylibpcap/0.6.4/pylibpcap-0.6.4.tar.gz'
+ homepage 'http://pylibpcap.sourceforge.net/'
+ sha1 '30b5d2e9dc8dcf6df067a216d9ecae109ff34f86'
+
+ patch do
+ url "https://gist.githubusercontent.com/nevdull77/10518493/raw/1f70c988a8ae572283e95f18a8120b2258f62982/pylibpcap-0.6.4-rfmon-mac.patch"
+ sha1 "5f737e3d3f5a749dd1bbcaee491f6ffc2b2b8ef0"
+ end
+
+ def install
+ system "/usr/local/bin/python setup.py install"
+ end
+end
\ No newline at end of file
diff --git a/Library/Formula/scapy.rb b/Library/Formula/scapy.rb
new file mode 100644
index 0000000..a3c71a3
--- /dev/null
+++ b/Library/Formula/scapy.rb
@@ -0,0 +1,19 @@
+require 'formula'
+
+class Scapy <Formula
+ depends_on :python
+ depends_on 'libdnet_python'
+ depends_on 'pylibpcap'
+ url 'http://www.secdev.org/projects/scapy/files/scapy-2.2.0.tar.gz'
+ homepage 'http://www.secdev.org/projects/scapy/'
+ sha1 'ae0a9947a08a01a84abde9db12fed074ac888e47'
+
+ patch do
+ url "https://gist.githubusercontent.com/nevdull77/10519183/raw/41271490e6bf5dbe0ad529f185484e34d188e78d/scapy-2.2.0-rfmon-mac.patch"
+ sha1 "d8a82b27e3ca702632583014cecef14e381a5e3d"
+ end
+
+ def install
+ system "/usr/local/bin/python setup.py install"
+ end
+end
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment