2011-03-10 05:11:03 +00:00
|
|
|
class John < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Featureful UNIX password cracker"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://www.openwall.com/john/"
|
|
|
|
url "http://www.openwall.com/john/j/john-1.8.0.tar.xz"
|
|
|
|
sha256 "952cf68369fb5b27f2d112ce7ca1eb16b975c85cbce8c658abb8bc5a20e1b266"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
conflicts_with "john-jumbo", :because => "both install the same binaries"
|
2012-10-21 18:55:00 +00:00
|
|
|
|
2014-03-19 17:07:53 +00:00
|
|
|
patch :DATA # Taken from MacPorts, tells john where to find runtime files
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2013-01-15 17:32:18 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
2013-03-01 17:10:12 +00:00
|
|
|
cause "Don't remember, but adding this to whitelist 2336."
|
2013-01-15 17:32:18 +00:00
|
|
|
end
|
|
|
|
|
2010-01-02 04:13:16 +00:00
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
2015-08-03 12:55:31 +00:00
|
|
|
arch = MacOS.prefer_64_bit? ? "64" : "sse2"
|
2014-02-09 03:38:42 +00:00
|
|
|
target = "macosx-x86-#{arch}"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2014-05-19 17:31:05 +00:00
|
|
|
system "make", "-C", "src", "clean", "CC=#{ENV.cc}", target
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-10-21 18:55:00 +00:00
|
|
|
# Remove the README symlink and install the real file
|
2015-08-03 12:55:31 +00:00
|
|
|
rm "README"
|
|
|
|
prefix.install "doc/README"
|
|
|
|
doc.install Dir["doc/*"]
|
2012-10-21 18:55:00 +00:00
|
|
|
|
|
|
|
# Only symlink the binary into bin
|
2015-08-03 12:55:31 +00:00
|
|
|
(share/"john").install Dir["run/*"]
|
|
|
|
bin.install_symlink share/"john/john"
|
2012-10-21 18:55:00 +00:00
|
|
|
|
|
|
|
# Source code defaults to 'john.ini', so rename
|
2015-08-03 12:55:31 +00:00
|
|
|
mv share/"john/john.conf", share/"john/john.ini"
|
2010-01-02 04:13:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
__END__
|
2012-10-21 18:55:00 +00:00
|
|
|
--- a/src/params.h 2012-08-30 13:24:18.000000000 -0500
|
|
|
|
+++ b/src/params.h 2012-08-30 13:25:13.000000000 -0500
|
|
|
|
@@ -70,15 +70,15 @@
|
|
|
|
* notes above.
|
|
|
|
*/
|
|
|
|
#ifndef JOHN_SYSTEMWIDE
|
|
|
|
-#define JOHN_SYSTEMWIDE 0
|
|
|
|
+#define JOHN_SYSTEMWIDE 1
|
2010-01-02 04:13:16 +00:00
|
|
|
#endif
|
|
|
|
|
2012-10-21 18:55:00 +00:00
|
|
|
#if JOHN_SYSTEMWIDE
|
|
|
|
#ifndef JOHN_SYSTEMWIDE_EXEC /* please refer to the notes above */
|
|
|
|
-#define JOHN_SYSTEMWIDE_EXEC "/usr/libexec/john"
|
|
|
|
+#define JOHN_SYSTEMWIDE_EXEC "HOMEBREW_PREFIX/share/john"
|
|
|
|
#endif
|
|
|
|
#ifndef JOHN_SYSTEMWIDE_HOME
|
|
|
|
-#define JOHN_SYSTEMWIDE_HOME "/usr/share/john"
|
|
|
|
+#define JOHN_SYSTEMWIDE_HOME "HOMEBREW_PREFIX/share/john"
|
|
|
|
#endif
|
|
|
|
#define JOHN_PRIVATE_HOME "~/.john"
|
|
|
|
#endif
|