2011-04-14 01:57:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class BulkExtractor < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Stream-based forensics tool"
|
2014-09-23 18:34:01 +00:00
|
|
|
homepage "https://github.com/simsong/bulk_extractor/wiki"
|
|
|
|
url "http://digitalcorpora.org/downloads/bulk_extractor/bulk_extractor-1.5.5.tar.gz"
|
|
|
|
sha1 "59cab1d96089043ad4a74483bd09179262b136ab"
|
|
|
|
|
2014-09-23 18:40:15 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "f1bca8f9e8110bae172f7d1911fdd03439fb1dfa" => :mavericks
|
|
|
|
sha1 "ff6c35229ec49ac068f1d3aafcad84b03125ad07" => :mountain_lion
|
|
|
|
sha1 "027a6f08f3f50a615bfbfe3fbf9e3df5b33f6c3d" => :lion
|
|
|
|
end
|
|
|
|
|
2014-09-23 18:34:01 +00:00
|
|
|
depends_on "afflib" => :optional
|
|
|
|
depends_on "boost"
|
|
|
|
depends_on "exiv2" => :optional
|
|
|
|
depends_on "libewf" => :optional
|
2012-09-26 03:20:58 +00:00
|
|
|
|
2011-04-14 01:57:04 +00:00
|
|
|
def install
|
2013-09-11 00:50:22 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
|
|
|
|
# Install documentation
|
2014-09-23 18:34:01 +00:00
|
|
|
(share/"bulk_extractor/doc").install Dir["doc/*.{html,txt,pdf}"]
|
2011-07-05 19:49:07 +00:00
|
|
|
|
2014-09-23 18:34:01 +00:00
|
|
|
(lib/"python2.7/site-packages").install Dir["python/*.py"]
|
2012-09-26 03:20:58 +00:00
|
|
|
|
|
|
|
# Install the GUI the Homebrew way
|
2014-09-23 18:34:01 +00:00
|
|
|
# .jar gets installed into bin by default
|
|
|
|
libexec.install bin/"BEViewer.jar"
|
|
|
|
(bin/"BEViewer").unlink
|
2012-08-07 18:20:52 +00:00
|
|
|
bin.write_jar_script libexec/"BEViewer.jar", "BEViewer", "-Xmx1g"
|
2011-06-14 16:21:14 +00:00
|
|
|
end
|
2014-04-13 00:44:19 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
input_file = testpath/"data.txt"
|
|
|
|
input_file.write "http://brew.sh\n(201)555-1212\n"
|
|
|
|
|
|
|
|
output_dir = testpath/"output"
|
|
|
|
system "#{bin}/bulk_extractor", "-o", output_dir, input_file
|
|
|
|
|
|
|
|
assert (output_dir/"url.txt").read.include?("http://brew.sh")
|
|
|
|
assert (output_dir/"telephone.txt").read.include?("(201)555-1212")
|
|
|
|
end
|
2011-04-14 01:57:04 +00:00
|
|
|
end
|