aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJ. Brandt Buckley2014-10-01 13:34:11 -0700
committerMike McQuaid2014-10-02 11:02:50 -0700
commit744a3d32c83fc730891b3d2e17008a5179e14deb (patch)
tree6a1ff3f45bfd5cda8fb3d6db9655daa99848d5ce /Library/Formula
parent5692b7a71160e4fb90799f1b3b5082051de11615 (diff)
downloadhomebrew-744a3d32c83fc730891b3d2e17008a5179e14deb.tar.bz2
Update p0f to version 3.0.7b, add test
- Update p0f to version 3.0.7b. - Add a simple test in which p0f reads a pcap file. In the test we write a simple binary pcap file (included in the recipe base64-encoded) and then attempt to read the file with p0f.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/p0f.rb22
1 files changed, 16 insertions, 6 deletions
diff --git a/Library/Formula/p0f.rb b/Library/Formula/p0f.rb
index 846c6a8cc..2ba48d7e5 100644
--- a/Library/Formula/p0f.rb
+++ b/Library/Formula/p0f.rb
@@ -2,13 +2,23 @@ require 'formula'
class P0f < Formula
homepage 'http://lcamtuf.coredump.cx/p0f3/'
- url 'http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.06b.tgz'
- sha1 'fecc9ed8b79dbf8e4d5ffbd22eda9d850b42c3c3'
+ url 'http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.07b.tgz'
+ sha1 'ae2c4fbcddf2a5ced33abd81992405b93207e7c8'
def install
- inreplace "config.h", "p0f.fp", "#{etc}/p0f/p0f.fp"
- system "./build.sh"
- sbin.install "p0f"
- (etc+"p0f").install "p0f.fp"
+ inreplace 'config.h', 'p0f.fp', "#{etc}/p0f/p0f.fp"
+ system './build.sh'
+ sbin.install 'p0f'
+ (etc + 'p0f').install 'p0f.fp'
+ end
+
+ test do
+ require 'base64'
+
+ pcap = '1MOyoQIABAAAAAAAAAAAAP//AAAAAAAA92EsVI67DgBEAAAA' \
+ 'RAAAAAIAAABFAABAbvpAAEAGAAB/AAABfwAAAcv8Iyjt2/Pg' \
+ 'AAAAALAC///+NAAAAgQ/2AEDAwQBAQgKCyrc9wAAAAAEAgAA'
+ (testpath / 'test.pcap').write(Base64.decode64(pcap))
+ system 'p0f', '-r', 'test.pcap'
end
end