2014-04-16 11:58:13 +00:00
|
|
|
class Hashpump < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Tool to exploit hash length extension attack"
|
2014-04-16 11:58:13 +00:00
|
|
|
homepage "https://github.com/bwall/HashPump"
|
2015-05-31 23:08:02 +00:00
|
|
|
url "https://github.com/bwall/HashPump/archive/v1.2.0.tar.gz"
|
|
|
|
sha256 "d002e24541c6604e5243e5325ef152e65f9fcd00168a9fa7a06ad130e28b811b"
|
|
|
|
|
2014-10-16 20:00:16 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-06-03 20:49:40 +00:00
|
|
|
revision 1
|
2015-09-24 05:04:46 +00:00
|
|
|
sha256 "bc00f1a7c60564fed1ebf0ece40306aa169e4a7ddf7f9c8d56c7088130f5e530" => :el_capitan
|
2015-06-03 20:49:40 +00:00
|
|
|
sha256 "8b33f44272b46174184639f3a6044f47151756039068343262d3e2cbe4a26a7c" => :yosemite
|
|
|
|
sha256 "667650946f6e697657832f9f906f3a548bc55991e2422f8cbbbe7c793434111f" => :mavericks
|
|
|
|
sha256 "a776ebf2d22d7b5fa492308fff20409696064ea70149c5cac695b75bcf004d7c" => :mountain_lion
|
2014-10-16 20:00:16 +00:00
|
|
|
end
|
|
|
|
|
2015-06-03 04:44:30 +00:00
|
|
|
option "without-python", "Build without python 2 support"
|
|
|
|
|
2014-10-16 19:49:11 +00:00
|
|
|
depends_on "openssl"
|
2015-06-03 04:44:30 +00:00
|
|
|
depends_on :python => :recommended if MacOS.version <= :snow_leopard
|
|
|
|
depends_on :python3 => :optional
|
|
|
|
|
|
|
|
# Remove on next release
|
|
|
|
patch do
|
|
|
|
url "https://patch-diff.githubusercontent.com/raw/bwall/HashPump/pull/14.diff"
|
|
|
|
sha256 "47236fed281000726942740002e44ef8bb90b05f55b2e7deeb183d9f708906c1"
|
|
|
|
end
|
2014-04-16 11:58:13 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
bin.mkpath
|
|
|
|
system "make", "INSTALLLOCATION=#{bin}",
|
|
|
|
"CXX=#{ENV.cxx}",
|
|
|
|
"install"
|
2015-06-03 04:44:30 +00:00
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
Language::Python.each_python(build) do |python, _version|
|
2015-06-03 04:44:30 +00:00
|
|
|
system python, *Language::Python.setup_install_args(prefix)
|
|
|
|
end
|
2014-04-16 11:58:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-05-31 23:08:02 +00:00
|
|
|
output = %x(#{bin}/hashpump -s '6d5f807e23db210bc254a28be2d6759a0f5f5d99' \\
|
2014-04-16 11:58:13 +00:00
|
|
|
-d 'count=10&lat=37.351&user_id=1&long=-119.827&waffle=eggo' \\
|
2015-05-31 23:08:02 +00:00
|
|
|
-a '&waffle=liege' -k 14)
|
2014-04-16 11:58:13 +00:00
|
|
|
assert output.include? "0e41270260895979317fff3898ab85668953aaa2"
|
|
|
|
assert output.include? "&waffle=liege"
|
|
|
|
assert_equal 0, $?.exitstatus
|
|
|
|
end
|
|
|
|
end
|