# Description: John the Ripper password cracker # URL: https://www.openwall.com/john/ # Maintainer: Nullspoon, nullspoon at oper dot io # Depends on: libgmp libpcap openmpi #opencl-icd-loader libxcrypt name=john version=1.9.0-jumbo-1 release=1 source=(https://www.openwall.com/john/k/${name}-${version}.tar.xz) build() { cd "${name}-${version}/src" ./configure --prefix=/usr make cd .. # config install -D -m 644 run/john.conf -t "${PKG}/etc/john" install -D -m 644 run/*.conf -t "${PKG}/usr/share/john" # docs install -d -m 644 ${PKG}/usr/share/doc/john cp -vr doc/README* doc/EXAMPLES doc/MASK doc/MODES doc/OPTIONS doc/RULES* \ "${PKG}/usr/share/doc/john/" # completion install -Dm 644 run/john.bash_completion "${PKG}/usr/share/bash-completion/completions/john" # scripts install -d "${PKG}/usr/bin" "${PKG}/usr/lib/john" install -Dm 755 run/{*.py,*.pl,*.rb,*.lua,*.js,mailer,benchmark-unify} -t "${PKG}/usr/lib/john" for ext in lua pl rb py; do for script in run/*."${ext}"; do ln -sf "/usr/lib/john/$(basename "${script}")" "${PKG}/usr/bin/$(basename "${script/.${ext}/}")" done done install -Dm 755 run/lib/* -t "${PKG}/usr/lib/john/lib" # binaries install -Dm 755 run/john -t "${PKG}/usr/bin" install -Dm 755 run/john-non-* -t "${PKG}/usr/lib/john"||true local john_bins=(bitlocker2john calc_stat cprepair dmg2john eapmd5tojohn genmkvpwd hccap2john \ keepass2john mkvcalcproba putty2john racf2john raw2dyna SIPdump uaf2john \ vncpcap2john wpapcap2john) for bin in "${john_bins[@]}"; do install -Dm 755 "run/${bin}" -t "${PKG}/usr/lib/john" ln -sf "/usr/lib/john/${bin}" "${PKG}/usr/bin/${bin}" done # symlink john for link in $(find run -maxdepth 1 -type l); do ln -s john "${PKG}/usr/bin/$(basename "${link}")" ln -s /usr/bin/john "${PKG}/usr/lib/john/$(basename "${link}")" done # data install -Dm 644 run/*.chr run/*.lst run/dictionary* run/stats -t "${PKG}/usr/share/john" install -Dm 644 run/rules/* -t "${PKG}/usr/share/john/rules" }