2010-03-19 06:09:45 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ssldump < Formula
|
2010-03-19 06:09:45 +00:00
|
|
|
url 'http://www.rtfm.com/ssldump/ssldump-0.9b3.tar.gz'
|
|
|
|
homepage 'http://www.rtfm.com/ssldump/'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'a633a9a811a138eac5ed440d583473b644135ef5'
|
2010-03-19 06:09:45 +00:00
|
|
|
|
2012-04-06 17:51:17 +00:00
|
|
|
# reorder include files
|
|
|
|
# http://sourceforge.net/tracker/index.php?func=detail&aid=1622854&group_id=68993&atid=523055
|
|
|
|
# increase pcap sample size from an arbitrary 5000 the max TLS packet size 18432
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2010-03-19 06:09:45 +00:00
|
|
|
def install
|
2010-10-21 14:54:17 +00:00
|
|
|
ENV["LIBS"] = "-lssl -lcrypto"
|
2010-03-19 06:09:45 +00:00
|
|
|
|
2010-10-21 14:54:17 +00:00
|
|
|
# .dylib, not .a
|
2012-04-06 17:51:17 +00:00
|
|
|
inreplace "configure", "if test -f $dir/libpcap.a; then",
|
|
|
|
"if test -f $dir/libpcap.dylib; then"
|
2010-03-19 06:09:45 +00:00
|
|
|
|
2012-04-06 17:51:17 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"osx"
|
2010-10-21 14:54:17 +00:00
|
|
|
system "make"
|
2010-03-19 06:09:45 +00:00
|
|
|
bin.install "ssldump"
|
2010-10-21 14:54:17 +00:00
|
|
|
man1.install "ssldump.1"
|
2010-03-19 06:09:45 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/base/pcap-snoop.c 2010-03-18 22:59:13.000000000 -0700
|
|
|
|
+++ b/base/pcap-snoop.c 2010-03-18 22:59:30.000000000 -0700
|
|
|
|
@@ -46,10 +46,9 @@
|
|
|
|
|
|
|
|
static char *RCSSTRING="$Id: pcap-snoop.c,v 1.14 2002/09/09 21:02:58 ekr Exp $";
|
|
|
|
|
|
|
|
-
|
|
|
|
+#include <net/bpf.h>
|
|
|
|
#include <pcap.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
-#include <net/bpf.h>
|
|
|
|
#ifndef _WIN32
|
|
|
|
#include <sys/param.h>
|
|
|
|
#endif
|
2012-04-06 17:51:17 +00:00
|
|
|
--- a/base/pcap-snoop.c 2012-04-06 10:35:06.000000000 -0700
|
|
|
|
+++ b/base/pcap-snoop.c 2012-04-06 10:45:31.000000000 -0700
|
|
|
|
@@ -286,7 +286,7 @@
|
|
|
|
err_exit("Aborting",-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- if(!(p=pcap_open_live(interface_name,5000,!no_promiscuous,1000,errbuf))){
|
|
|
|
+ if(!(p=pcap_open_live(interface_name,18432,!no_promiscuous,1000,errbuf))){
|
|
|
|
fprintf(stderr,"PCAP: %s\n",errbuf);
|
|
|
|
err_exit("Aborting",-1);
|
|
|
|
}
|